|
Re: IDL: plots in semi- or log-log [message #8412 is a reply to message #8362] |
Fri, 07 March 1997 00:00   |
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  |
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 | |
+----------------------------------------------------------- --+---------+
|
|
|