[comp.lang.idl-pvwave] Bug in legend.pro

rfinch@caldwr.water.ca.gov (Ralph Finch) (01/16/91)

The legend.pro as distributed in 3.0 of PV-Wave won't adjust its text
size with the !p.charsize system variable.  The following corrects it:

*** legend.pro	Tue Jan 15 18:56:10 1991
--- legend.pro.orig	Tue Jan 15 17:03:09 1991
***************
*** 128,134 ****
      !P.PSym = MySyms (I)			 ;Adjust the plot symbol
      OPlot, Line_X, Line_Y - I * Delta_Y	 ;Overplot the line segment
      !P.LineStyle = 0
!     XYOutS, Text_X, Text_Y - I * Delta_Y, Labels (I), charsize=Text_Size
  					 ;Print the label
    EndFor
  
--- 128,134 ----
      !P.PSym = MySyms (I)			 ;Adjust the plot symbol
      OPlot, Line_X, Line_Y - I * Delta_Y	 ;Overplot the line segment
      !P.LineStyle = 0
!     XYOutS, Text_X, Text_Y - I * Delta_Y, Labels (I); Text_Size
  					 ;Print the label
    EndFor
  
-- 
Ralph Finch			916-445-0088
rfinch@water.ca.gov		...ucbvax!ucdavis!caldwr!rfinch
Any opinions expressed are my own; they do not represent the DWR

rfinch@caldwr.water.ca.gov (Ralph Finch) (01/19/91)

Found another bug in legend.pro; here's the fix, including the
previous bug.

*** legend.pro	Fri Jan 18 09:38:53 1991
--- legend.pro.orig	Tue Jan 15 17:03:09 1991
***************
*** 91,98 ****
  Endif
  
  Text_Size = 1				;Select a default size for the text
! If (!P.Charsize NE 1. AND !P.Charsize NE 0) Then $
!     Text_Size = !P.Charsize
  
  If n_elements(Data_X) eq 0 THEN Begin
      Data_X = 0.0			;Define as floating point
--- 91,98 ----
  Endif
  
  Text_Size = 1				;Select a default size for the text
! If (!P.Charsize NE 1.) Then $		;If !Fancy is on,
!     Text_Size = !P.Charsize		;use its formula
  
  If n_elements(Data_X) eq 0 THEN Begin
      Data_X = 0.0			;Define as floating point
***************
*** 128,134 ****
      !P.PSym = MySyms (I)			 ;Adjust the plot symbol
      OPlot, Line_X, Line_Y - I * Delta_Y	 ;Overplot the line segment
      !P.LineStyle = 0
!     XYOutS, Text_X, Text_Y - I * Delta_Y, Labels (I), charsize=Text_Size
    EndFor
  
  Finished:
--- 128,135 ----
      !P.PSym = MySyms (I)			 ;Adjust the plot symbol
      OPlot, Line_X, Line_Y - I * Delta_Y	 ;Overplot the line segment
      !P.LineStyle = 0
!     XYOutS, Text_X, Text_Y - I * Delta_Y, Labels (I); Text_Size
! 					 ;Print the label
    EndFor
  
  Finished:
-- 
Ralph Finch			916-445-0088
rfinch@water.ca.gov		...ucbvax!ucdavis!caldwr!rfinch
Any opinions expressed are my own; they do not represent the DWR