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

Home » Public Forums » archive » Re: Tick mark label with !P.Multi
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
Re: Tick mark label with !P.Multi [message #76514] Fri, 17 June 2011 10:14
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Friday, June 17, 2011 11:43:58 AM UTC-4, Alexa wrote:
> Could you explain how you're defining on_bottom_line?
>
> On Jun 17, 10:59 am, Jeremy Bailin <astro...@gmail.com> wrote:
>> So only do it when you're on those plots... which in this case, is when nt is 18 or 19. Or more generally:
>>
>> on_bottom_line = (nt / !p.multi[1]) eq (!p.multi[2] - 1)
>> if on_bottom_line then format='(A1)' else format=''
>> plot, ......., xtickformat=format, ....
>>
>> -Jeremy.

If you have NX by NY panels, IDL starts at the top-left and goes right, and then down to the next line, etc. So the index "nt" in your for loop is related to the Xi, Yi panel by:

nt = Xi + NX * Yi

You want the ones where Yi is equal to NY-1. Since nt and NX are integers and Xi is always less than NX, you have Yi = (nt / NX). So the code tests whether (nt / NX) is equal to NY-1.

-Jeremy.
Re: Tick mark label with !P.Multi [message #76515 is a reply to message #76514] Fri, 17 June 2011 09:15 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Jun 17, 11:43 am, Alexa <alexa7...@gmail.com> wrote:
> Could you explain how you're defining on_bottom_line?
>
> On Jun 17, 10:59 am, Jeremy Bailin <astroco...@gmail.com> wrote:
>
>
>
>
>
>
>
>> So only do it when you're on those plots... which in this case, is when nt is 18 or 19. Or more generally:
>
>> on_bottom_line = (nt / !p.multi[1]) eq (!p.multi[2] - 1)
>> if on_bottom_line then format='(A1)' else format=''
>> plot, ......., xtickformat=format, ....
>
>> -Jeremy.

Why don't you use MULTIPLOT from the NASA IDL Astro Library?
Re: Tick mark label with !P.Multi [message #76516 is a reply to message #76515] Fri, 17 June 2011 08:43 Go to previous message
Alexa is currently offline  Alexa
Messages: 8
Registered: June 2011
Junior Member
Could you explain how you're defining on_bottom_line?

On Jun 17, 10:59 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> So only do it when you're on those plots... which in this case, is when nt is 18 or 19. Or more generally:
>
> on_bottom_line = (nt / !p.multi[1]) eq (!p.multi[2] - 1)
> if on_bottom_line then format='(A1)' else format=''
> plot, ......., xtickformat=format, ....
>
> -Jeremy.
Re: Tick mark label with !P.Multi [message #76519 is a reply to message #76516] Fri, 17 June 2011 07:59 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
So only do it when you're on those plots... which in this case, is when nt is 18 or 19. Or more generally:

on_bottom_line = (nt / !p.multi[1]) eq (!p.multi[2] - 1)
if on_bottom_line then format='(A1)' else format=''
plot, ......., xtickformat=format, ....

-Jeremy.
Re: Tick mark label with !P.Multi [message #76520 is a reply to message #76519] Fri, 17 June 2011 07:44 Go to previous message
Alexa is currently offline  Alexa
Messages: 8
Registered: June 2011
Junior Member
On Jun 17, 10:22 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> xtickformat='(A1)'

Thanks for replying Jeremy but that makes all the tick mark labels go
away. I have an image with two columns of plots and I would like for
only the bottom two plots to have labels. Here is a stripped down
version of my plotting code if that helps.

!P.Multi=[0,2,10,0,1]

;;Plot radial velocities for each absorption feature
FOR nt=0, N_ELEMENTS(Transition)-1 DO BEGIN
ReadCol, Transition[nt], wavelength, flux, sigma, format='f,f,f'
plot, Velocity, flux, xrange=[-500, 500], xstyle=1, xminor=1,
yminor=1,$
ytickformat='(a1)',xtickformat='(a1)', psym=10
oplot, Velocity, sigma
xyouts, 300, 0, Transition[nt]
ENDFOR

!P.Multi=0
Re: Tick mark label with !P.Multi [message #76522 is a reply to message #76520] Fri, 17 June 2011 07:22 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
xtickformat='(A1)'
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Tick mark label with !P.Multi
Next Topic: Venn Diagram in IDL?

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

Current Time: Sat Oct 11 03:56:09 PDT 2025

Total time taken to generate the page: 0.56175 seconds