plot positional degrees [message #89864] |
Thu, 11 December 2014 21:49  |
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  |
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?
|
|
|