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

Home » Public Forums » archive » plot positional degrees
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
plot positional degrees [message #89864] Thu, 11 December 2014 21:49 Go to next message
Beau Bellamy is currently offline  Beau Bellamy
Messages: 2
Registered: September 2013
Junior Member
I'm using IDL 8.2
I have a list of positions (RA and Dec) of stars and i want to plot them on a figure, eg.

37.9 ~ 37 54' 0"

37.7 ~ 37 42' 0"

I read in the positions (degrees) in as strings and extract the degrees, minutes and seconds into separate arrays. These are then used to convert the values to decimal degrees for plotting.

I would like to also have the alternate axis labelled with degrees. i.e.

37.9 ~ 37 54' 0"

37.6 ~ 37 42' 0"

Is there a way to do this other than using something like power point to do it?

Also is there a better way, than having the axis scaled the same, to force the plot to be a square plot using the plot procedure?
Re: plot positional degrees [message #89866 is a reply to message #89864] Fri, 12 December 2014 03:27 Go to previous message
andeh is currently offline  andeh
Messages: 23
Registered: April 2011
Junior Member
How abouts using a tickformat function.


FUNCTION POSTICKS, axis, index, value

deg = FLOOR(value)
min = FLOOR( (value - deg) * 60 )
sec = FLOOR( ( (value - deg) * 60 - min)*60 )

RETURN, STRING(deg, min,"'", sec,'"', FORMAT='(I0,1X,I02,A1,1X,I02,A1)')

END




PLOT, ra, dec, XTICKFORMAT='POSTICKS', YTICKFORMAT='POSTICKS', PSYM=1, /ISOTROPIC


I think the isotropic keyword should help with the square issue.



Andy



On Friday, 12 December 2014 05:49:41 UTC, Beau Bellamy wrote:
> I'm using IDL 8.2
> I have a list of positions (RA and Dec) of stars and i want to plot them on a figure, eg.
>
> 37.9 ~ 37 54' 0"
>
> 37.7 ~ 37 42' 0"
>
> I read in the positions (degrees) in as strings and extract the degrees, minutes and seconds into separate arrays. These are then used to convert the values to decimal degrees for plotting.
>
> I would like to also have the alternate axis labelled with degrees. i.e.
>
> 37.9 ~ 37 54' 0"
>
> 37.6 ~ 37 42' 0"
>
> Is there a way to do this other than using something like power point to do it?
>
> Also is there a better way, than having the axis scaled the same, to force the plot to be a square plot using the plot procedure?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Widget_list keeps changing size, what should I do?
Next Topic: make all array values equal to zero

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

Current Time: Wed Oct 08 07:14:59 PDT 2025

Total time taken to generate the page: 0.00403 seconds