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

Home » Public Forums » archive » add a period axis?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: add a period axis? [message #27268 is a reply to message #27192] Sat, 13 October 2001 04:10 Go to previous messageGo to previous message
web is currently offline  web
Messages: 24
Registered: March 2001
Junior Member
The following can do:
x=findgen(100)/100.
xrange=[0.1,1]
!p.position=[0.2,0.2,0.8,0.8]
xticks=9 & xtickv=[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0]
plot,x,sin(x*20),xstyle=9,ystyle=1,yrange=[-1,1],xrange=xran ge,xticks=xticks
,xtickv=xtickv
axis,xaxis=1,xrange=xrange,xticks=xticks,xtickname=string(1. /xtickv,format='
(f4.1)'),xstyle=1
end

Then period 2 is coressponded to frequency 0.5. But I hope
tickv=[10,9,8,7,6,5,4,3,2,1] for period axis. How to do then? Maybe '/xlog'
will be used, because log(period)=-log(frequency). But I failed to do that,
although I tried again and again.


"Steve Smith<steven_smith>" <nobody@nowhere.com> wrote in message
news:slrn9se1lj.mo2.nobody@pooh.nrel.gov...
> On Fri, 12 Oct 2001 10:15:38 +0800, jiali <jiali3@21cn.com> wrote:
>> Hi, Why are there not answer? Is it possible to add a period axis? Hope
to
>> get your reply soon. Jiali
>>
>> "jiali" <jiali3@21cn.com> wrote in message
>> news:9q2p35$8oa$1@mail.cn99.com...
>>> Hi,
>>>
>>> I wonder how to add another axis. First create a frequency-power plot:
>>>
>>> plot,fre,power,xrange=[1,10],yrange=[0,10],xtitle='Frequency '
>>>
>>> I hope to add an axis on the top but with period(=1/frequency) ticks.
>> Maybe
>>> like following:
>>>
>>> aixs,1,10,/xaxis,xrange=[1,0.1], xtitle='Period',......???
>>>
>
> I would make an array of labels you'd like to use say label[], then
something
> like:
> axis, xaxis=1,xticks=5,xminor=0,xtickn=label,xtitle='Period'
> should work fine.
>
>>> Would you please help me to finish the above?
>>>
>>> Best,
>>> Jiali
>>>
>>>
>>>
>>
>>
>
>
> --
> Steve S.
>
> steve@NOSPAMmailaps.org
> remove NOSPAM before replying
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fit function
Next Topic: IDL Help Gone Missing

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

Current Time: Fri Oct 10 09:00:56 PDT 2025

Total time taken to generate the page: 1.68035 seconds