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

Home » Public Forums » archive » IDL: plots in semi- or log-log
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: IDL: plots in semi- or log-log [message #8486 is a reply to message #8362] Tue, 11 March 1997 00:00 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
Tony Adriaansen wrote:
>
> In article <331AC300.41C6@obs-nice.fr>,
> Frederic Paletou <paletou@obs-nice.fr> wrote:
>> Hi there,
>>
>> I'm wondering if there's a simple way to avoid getting
>> a 10^0 tickmark when using a log-axis with PLOT.
>>
>> Cheers,
[SIG.SNIP]
>
> Hi Frederic,
> There's a real simple way IF 10^0 is your FIRST tickmark:
>
> plot_oi,x,y,xtickname='1'
>
> This replaces the first tickmark label only, IDL/PVWAVE
> puts in the others.
>
> Where 10^0 is NOT the first ticklabel, make a string array containing
> the real labels:
>
[SIG.SNIP]

Or more elegantly define a tick format function e.g.

FUNCTION ltformat, iax, index, val

jpow = round(alog10(val))
if (jpow eq 0) then return, '1' $
else return, string(jpow, format="('10!u',i0,'!n')")

end

then do (e.g.)
plot, x,y, xtickformat='ltformat', /xlog

--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Tephigram
Next Topic: IDL 5.0!

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

Current Time: Sat Oct 11 10:48:21 PDT 2025

Total time taken to generate the page: 1.12155 seconds