Problem with tick marks [message #85572] |
Sun, 18 August 2013 05:50  |
Sir Loin Steak
Messages: 42 Registered: January 2012
|
Member |
|
|
Hi all,
This is probably easy to solve, but is confusing me! I am plotting atmospheric data in pressure coordinates, and all I want is
1. The pressure axis to go from 500 to 10 in a log scale
2. The pressures 500,100,10 to be labelled
3. Minor tickmarks as in a standard log plot, e.g. at 400,300,200,90,80,...20
However I seem to be having trouble getting this.
If I plot the y axis from 1000 to 10, then all is fine:
contour, fltarr(2,2), [0,1], [1000,10], /nodata, $
yrange=[1000,10], ystyle=1, /ylog
However, if I specify the yrange as [500,10] then the minor tickmarks are ok, but IDL only labels the levels 100 and 10:
contour, fltarr(2,2), [0,1], [1000,10], /nodata, $
yrange=[500,10], ystyle=1, /ylog
If I specify I want the pressures 500,100,10 labelled, then IDL does this, but removes the minor tickmarks:
contour, fltarr(2,2), [0,1], [1000,10], /nodata, $
yrange=[500,10], ystyle=1, /ylog, $
yticks=2, ytickv=[500,100,10]
I can't specify the yminor value, as it is different going from 500-100 compared to 100-10.
Is there something obvious I'm missing?
Thanks in advance!
|
|
|
Re: Problem with tick marks [message #85573 is a reply to message #85572] |
Sun, 18 August 2013 06:39   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ljs15@fsmail.net writes:
> This is probably easy to solve, but is confusing me! I am plotting atmospheric data in pressure coordinates, and all I want is
>
> 1. The pressure axis to go from 500 to 10 in a log scale
> 2. The pressures 500,100,10 to be labelled
> 3. Minor tickmarks as in a standard log plot, e.g. at 400,300,200,90,80,...20
I think you might want to read this article:
http://www.idlcoyote.com/graphics_tips/minorlog.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: Problem with tick marks [message #85574 is a reply to message #85573] |
Sun, 18 August 2013 07:27  |
Sir Loin Steak
Messages: 42 Registered: January 2012
|
Member |
|
|
On Sunday, 18 August 2013 14:39:56 UTC+1, David Fanning wrote:
> ljs15@fsmail.net writes:
>
>
>
>> This is probably easy to solve, but is confusing me! I am plotting atmospheric data in pressure coordinates, and all I want is
>
>>
>
>> 1. The pressure axis to go from 500 to 10 in a log scale
>
>> 2. The pressures 500,100,10 to be labelled
>
>> 3. Minor tickmarks as in a standard log plot, e.g. at 400,300,200,90,80,...20
>
>
>
> I think you might want to read this article:
>
>
>
> http://www.idlcoyote.com/graphics_tips/minorlog.html
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Thanks David, that's a great help.
It would still be nice if it would plot the minor axis labels rather than just naming those with values 1,2,5,10 etc.
Maybe I'll have a fiddle around and see what I can come up with. :)
|
|
|