Axis Labels [message #87050] |
Mon, 30 December 2013 21:40  |
Gompie
Messages: 76 Registered: August 2012
|
Member |
|
|
Hi,
I am trying to plot using the command
cgplot,scan,r_mean,yrange=[-0.7,0.3],xrange=[-50,50], title=TTITLE,BACKGROUND = 255, YTITLE=textlabel,XTITLE='IASI SCAN ANGLE (deg)',COLOR = 3,symsize=1.5, thick=2.3,min_value=-50,FONT =1,CHARSIZE=2.7,xstyle=0
I want my xaxis labels to start with -50 with interval of 10 and end with 50.
But using xstyle=1 does force my plot to -50,50 by the labels are only displayed -40 to 40 with plot extending beyong -40 and 40.
When I use xstyle=0 the plot goes from -60 to 60.
Please help
Glanplon
|
|
|
Re: Axis Labels [message #87051 is a reply to message #87050] |
Mon, 30 December 2013 22:18   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Gompie writes:
> I am trying to plot using the command
>
> cgplot,scan,r_mean,yrange=[-0.7,0.3],xrange=[-50,50], title=TTITLE,BACKGROUND = 255, YTITLE=textlabel,XTITLE='IASI SCAN ANGLE (deg)',COLOR = 3,symsize=1.5, thick=2.3,min_value=-50,FONT =1,CHARSIZE=2.7,xstyle=0
>
> I want my xaxis labels to start with -50 with interval of 10 and end with 50.
>
> But using xstyle=1 does force my plot to -50,50 by the labels are only displayed -40 to 40 with plot extending beyong -40 and 40.
>
> When I use xstyle=0 the plot goes from -60 to 60.
Add XTICKS=10.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
Re: Axis Labels [message #87056 is a reply to message #87055] |
Tue, 31 December 2013 10:14   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Gompie writes:
> Thanks for that. But my axis fonts and numbers are not of good quality, appear thick and thin.
>
> https://drive.google.com/file/d/0B-c7rZr_rKoSbnQ1TzcwTTNSM1E /edit?usp=sharing
>
> I am using the cgplot command i listed earlier and to make gif I use...
>
> outfile="example.gif"
> print,outfile
> WRITE_GIF, outfile, TVRD()
> result = cgSnapshot(FILENAME="example",/gif ,/nodialog)
I can imagine. :-)
I would install ImageMagick and do this:
cgps_open, 'example.gif'
cgPlot, ...
cgps_close
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: Axis Labels [message #87057 is a reply to message #87056] |
Tue, 31 December 2013 10:15   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
>
> Gompie writes:
>
>> Thanks for that. But my axis fonts and numbers are not of good quality, appear thick and thin.
>>
>> https://drive.google.com/file/d/0B-c7rZr_rKoSbnQ1TzcwTTNSM1E /edit?usp=sharing
>>
>> I am using the cgplot command i listed earlier and to make gif I use...
>>
>> outfile="example.gif"
>> print,outfile
>> WRITE_GIF, outfile, TVRD()
>> result = cgSnapshot(FILENAME="example",/gif ,/nodialog)
>
> I can imagine. :-)
>
> I would install ImageMagick and do this:
>
> cgps_open, 'example.gif'
> cgPlot, ...
> cgps_close
Or, more simply, since you only have one cgPlot command:
cgPlot, ..., Output='example.gif'
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
|
|
|
|
|
Re: Axis Labels [message #87088 is a reply to message #87080] |
Tue, 07 January 2014 03:52   |
Yngvar Larsen
Messages: 134 Registered: January 2010
|
Senior Member |
|
|
On Monday, 6 January 2014 18:50:55 UTC+1, Gompie wrote:
> Hi David,
>
> Thanks for that Function Graphics work great.
>
> Is there a function to get the font information ( type size thickness), that goes into a plot creation ?
I guess you are looking for the following information? Incidentally, you should have provided this information during creation yourself, unless you want the default (Helvetica, 12pt, Roman).
IDL> p = plot([0,1], [0,1])
IDL> t = text(0.6, 0.4, 'Some text', font_name='Times', font_size=16)
IDL> print, t.font_name, t.font_size
Times 16.000000
IDL> case t.font_style of 0: print, 'Roman' & 1: print, 'Bold' & 2: print, 'Italic' & 3: print, 'Bold Italic' & endcase
Roman
See also:
http://www.exelisvis.com/docs/TEXT.html
Or are you looking for the fonts on the plot axes? Those are properties of the plot object P, with the same names:
IDL> print, p.font_name, p.font_size, p.font_style
Helvetica 12.000000 0
or check the properties of the axes "inside" the object P":
IDL> help, p.axes
<Expression> OBJREF = Array[4]
IDL> for ii=0,3 do print, (p.axes)[ii].tickfont_name
Helvetica
Helvetica
Helvetica
Helvetica
IDL> for ii=0,3 do print, (p.axes)[ii].tickfont_size
12.000000
12.000000
12.000000
12.000000
IDL> for ii=0,3 do print, (p.axes)[ii].tickfont_style
0
0
0
0
--
Yngvar
|
|
|
|