comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Axis Labels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Axis Labels [message #87050] Mon, 30 December 2013 21:40 Go to next message
Gompie is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 #87055 is a reply to message #87051] Tue, 31 December 2013 10:09 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Hi David,
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)

Any help.
GlanPlon
Re: Axis Labels [message #87056 is a reply to message #87055] Tue, 31 December 2013 10:14 Go to previous messageGo to next message
David Fanning is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 #87060 is a reply to message #87057] Tue, 31 December 2013 12:11 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Thanks David,
I have multiple cgplot cgerror cgtext overlaying
I dont have imagemagic and cannot install it.
Do you have a way out or suggest fonts that would yeild good quality in the situation I am in.
Re: Axis Labels [message #87061 is a reply to message #87060] Tue, 31 December 2013 12:15 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gompie writes:

> I have multiple cgplot cgerror cgtext overlaying
> I dont have imagemagic and cannot install it.
> Do you have a way out or suggest fonts that would yeild good quality in the situation I am in.

Function graphics, if they work, are always a fallback. The Plot()
function has been fairly reliable.

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 #87062 is a reply to message #87061] Tue, 31 December 2013 14:26 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Thanks David,
If I were to use Plot() Function graphics and wish to overplot then
1. What is the equivalent of cgtext
2. What is the equivalent of cgerror
3. What is the equivalent of xticks

Thanks again,
GlanPlon
Re: Axis Labels [message #87063 is a reply to message #87062] Tue, 31 December 2013 14:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gompie writes:

> If I were to use Plot() Function graphics and wish to overplot then
> 1. What is the equivalent of cgtext

Text()

> 2. What is the equivalent of cgerror

I don't know, I'm not familiar with cgError. Maybe ErrorPlot()?

> 3. What is the equivalent of xticks

I don't know this, either. Maybe the XTickInterval keyword?

I'm not terribly familiar with function graphics routines. Sorry. :-(

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 #87080 is a reply to message #87063] Mon, 06 January 2014 09:50 Go to previous messageGo to next message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
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 ?
Rgds
Gompie
Re: Axis Labels [message #87081 is a reply to message #87080] Mon, 06 January 2014 09:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gompie writes:

> Is there a function to get the font information ( type size thickness), that goes into a plot creation ?

Well, uh, you are *creating* the plot, right? I must be misunderstanding
something.

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 Go to previous messageGo to next message
Yngvar Larsen is currently offline  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
Re: Axis Labels [message #87096 is a reply to message #87088] Tue, 07 January 2014 08:08 Go to previous message
Gompie is currently offline  Gompie
Messages: 76
Registered: August 2012
Member
Thanks Yngvar !!! That was indeed what I was looking for...
GlanPlon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can't suppress 0 on AXIS call
Next Topic: Unexplained Object Graphics cursor offset on Windows7

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:42:56 PDT 2025

Total time taken to generate the page: 0.00608 seconds