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 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL: plots in semi- or log-log [message #8362] Mon, 03 March 1997 00:00 Go to next message
Frederic Paletou is currently offline  Frederic Paletou
Messages: 1
Registered: March 1997
Junior Member
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,
--
Frederic PALETOU tel: (+33) 4 92 00 30 50
Observatoire de la Cote d'Azur fax: (+33) 4 92 00 31 21
Departement Cassini paletou@obs-nice.fr
B.P. 4229 ; F-06304 Nice Cedex 4 http://www.obs-nice.fr/paletou/
Re: IDL: plots in semi- or log-log [message #8412 is a reply to message #8362] Fri, 07 March 1997 00:00 Go to previous messageGo to next message
tonya is currently offline  tonya
Messages: 2
Registered: March 1997
Junior Member
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,
> --
> Frederic PALETOU tel: (+33) 4 92 00 30 50
> Observatoire de la Cote d'Azur fax: (+33) 4 92 00 31 21
> Departement Cassini paletou@obs-nice.fr
> B.P. 4229 ; F-06304 Nice Cedex 4 http://www.obs-nice.fr/paletou/

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:

my_ticklabels=['10!U-6!N','10!U-5!N',.....etc]
plot_oi,x,y,xtickname=my_ticklabels


(or the variant to plot with log x-axis--> plot,/xlog ...,/ylog etc.)
--
| Tony Adriaansen ~ @_ ~ )))
| Phone: +61 2 413 7211 ~ __| \ )))
| Fax: +61 2 413 7204 [__/__) )))
| email: TonyA@dap.csiro.au __/ \< /__
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 | |
+----------------------------------------------------------- --+---------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Tephigram
Next Topic: IDL 5.0!

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

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

Total time taken to generate the page: 0.00609 seconds