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

Home » Public Forums » archive » Inhibit setting the X axis starting value to 0
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
Inhibit setting the X axis starting value to 0 [message #89129] Sun, 27 July 2014 07:36 Go to next message
amin farhang is currently offline  amin farhang
Messages: 39
Registered: November 2010
Member
Dear All,

Does anyone known how inhibit setting the X axis starting value to 0?
for example in following plot X labels are [0,100,200,300] but i want just show the [100,200,300] labels.

IDL> cgplot,findgen(300)


Thanks,
Re: Inhibit setting the X axis starting value to 0 [message #89131 is a reply to message #89129] Sun, 27 July 2014 08:04 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Sunday, July 27, 2014 10:36:58 AM UTC-4, Amin Farhang wrote:
> Dear All,
>
>
>
> Does anyone known how inhibit setting the X axis starting value to 0?
>
> for example in following plot X labels are [0,100,200,300] but i want just show the [100,200,300] labels.
>
>
>
> IDL> cgplot,findgen(300)
>
>
>
>
>
> Thanks,

As with the built-in PLOT() function, setting XTICKVALUES = [100,200,300] will do what you want.

TTFN,

David
Re: Inhibit setting the X axis starting value to 0 [message #89132 is a reply to message #89129] Sun, 27 July 2014 08:19 Go to previous messageGo to next message
amin farhang is currently offline  amin farhang
Messages: 39
Registered: November 2010
Member
Thanks David

Actually I have write all my codes with coyote library and cgPlot procedure do not support XTICKVALUES. Is there a general way to handle this?
Re: Inhibit setting the X axis starting value to 0 [message #89133 is a reply to message #89132] Sun, 27 July 2014 08:23 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 27.07.2014 17:19, Amin Farhang wrote:
> cgPlot procedure do not support XTICKVALUES

cgPlot is a wrapper to IDL's plot procedure. You can try:

cgPlot, INDGEN(300), XTICKV=[100,200,300], XTICKS=2
Re: Inhibit setting the X axis starting value to 0 [message #89134 is a reply to message #89129] Sun, 27 July 2014 08:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Amin Farhang writes:

> Does anyone known how inhibit setting the X axis starting value to 0?
> for example in following plot X labels are [0,100,200,300] but i want just show the [100,200,300] labels.
>
> IDL> cgplot,findgen(300)

IDL> cgPlot, Findgen(300), XTickV=[100,200,300], XTicks=3

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: Inhibit setting the X axis starting value to 0 [message #89135 is a reply to message #89129] Sun, 27 July 2014 08:29 Go to previous message
amin farhang is currently offline  amin farhang
Messages: 39
Registered: November 2010
Member
Thanks from all of you. It works great.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Organizing arrays
Next Topic: IDL_IDLBridge and the virtual machine

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

Current Time: Wed Oct 08 13:48:58 PDT 2025

Total time taken to generate the page: 0.00768 seconds