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

Home » Public Forums » archive » Ploting help
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
Ploting help [message #92318] Tue, 17 November 2015 09:25 Go to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Folks,
Hi,
I have some data like:
19-Apr 35.9
03-May 32.4
11-May 23.3
......
I want to plot this data as (x-y) plot as it is. I mean in x axis like: 19-Apr, 03-May, 11-May, ... and on the y axis just the number that i have. I do not want to convert them as Julian days or something else.
Any kind of help highly would be appreciated,
Cheers,
Dave
Re: Ploting help [message #92320 is a reply to message #92318] Tue, 17 November 2015 09:57 Go to previous messageGo to next message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
You mean like this?

xtickname=['19-Apr','03-May','11-May']
y=[35,32,23]
n=n_elements(y)
plot,indgen(n),y,xtickname=xtickname,xticks=n-1

cheers,
Greg
Re: Ploting help [message #92321 is a reply to message #92320] Tue, 17 November 2015 10:09 Go to previous messageGo to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Tuesday, November 17, 2015 at 9:27:27 PM UTC+3:30, greg...@googlemail.com wrote:
> You mean like this?
>
> xtickname=['19-Apr','03-May','11-May']
> y=[35,32,23]
> n=n_elements(y)
> plot,indgen(n),y,xtickname=xtickname,xticks=n-1
>
> cheers,
> Greg

Wow YES
Thanks :)
That made the trick :)
Cheers,
Dave
Re: Ploting help [message #92331 is a reply to message #92321] Thu, 19 November 2015 03:57 Go to previous messageGo to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Tuesday, November 17, 2015 at 7:09:51 PM UTC+1, dave poreh wrote:
> On Tuesday, November 17, 2015 at 9:27:27 PM UTC+3:30, greg...@googlemail.com wrote:
>> You mean like this?
>>
>> xtickname=['19-Apr','03-May','11-May']
>> y=[35,32,23]
>> n=n_elements(y)
>> plot,indgen(n),y,xtickname=xtickname,xticks=n-1
>>
>> cheers,
>> Greg
>
> Wow YES
> Thanks :)
> That made the trick :)
> Cheers,
> Dave

Hi Greg;
Just one more thing:
How could i rotate the xtickname 90 degrees? I mean in vertical orientation?
Cheers,
Dave,
Re: Ploting help [message #92349 is a reply to message #92331] Mon, 23 November 2015 07:21 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
On Thursday, November 19, 2015 at 12:57:23 PM UTC+1, dave poreh wrote:
> On Tuesday, November 17, 2015 at 7:09:51 PM UTC+1, dave poreh wrote:
>> On Tuesday, November 17, 2015 at 9:27:27 PM UTC+3:30, greg...@googlemail.com wrote:
>>> You mean like this?
>>>
>>> xtickname=['19-Apr','03-May','11-May']
>>> y=[35,32,23]
>>> n=n_elements(y)
>>> plot,indgen(n),y,xtickname=xtickname,xticks=n-1
>>>
>>> cheers,
>>> Greg
>>
>> Wow YES
>> Thanks :)
>> That made the trick :)
>> Cheers,
>> Dave
>
> Hi Greg;
> Just one more thing:
> How could i rotate the xtickname 90 degrees? I mean in vertical orientation?
> Cheers,
> Dave,


Then I think you have to position the labels yourself...

xtickname=['19-Apr','03-May','11-May']
y=[35,32,23]
n=n_elements(y)
x=indgen(n)
plot,x,y,xticks=n-1,xtickname=replicate(' ',n),position=[.15,.2,.9,.9]
xyouts,x,x*0,xtickname+" ",orientation=90,alignment=1



If you want better quality graphics (but still the old way), you can try

gmw=obj_new("gmwindow")
xtickname=['19-Apr','03-May','11-May']
y=[35,32,23]
n=n_elements(y)
x=indgen(n)
gmw->plot,x,y,xticks=n-1,xtickname=replicate(' ',n),position=[.15,.2,.9,.9]
gmw->xyouts,x,x*0,xtickname+" ",orientation=90,alignment=1


required routines are here: http://hrscview.fu-berlin.de/mex4/software/idl/gmwindow/

cheers,
Greg
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL 7.1 help system crashes
Next Topic: Compare non-linear function fit parameters of two data sets

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

Current Time: Wed Oct 08 09:22:51 PDT 2025

Total time taken to generate the page: 0.00375 seconds