[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Double tickmark annotations

"Shawn L. Young" <young@chaos.dartmouth.edu> writes:

> Hello,
> 	I would like to know how to give more than one name to a each
> tickmark along the x axis.  For instance, I want to list both a satellite's
> latitude and radial distance from the center of the Earth along the x axis.
> However, I don't know ahead of time how these two quantities correlate so I
> can't hardwire tick names using xtickname.  Is there a way to give the plot
> routine both arrays and have it determine the ticknames?  If not, the help
> file is very brief on the use of xtickname.  If I knew how IDL chose where
> to put the ticknames I might be able to write code to do the correlating on
> the fly.  But when I am using a > 500 element array for the x axis and want
> to be sure that I am doing the best correlation I can between array
> elements and xtickname elements.

You should pay more attention in the newsgroup which may solve your
problem.  Irene just pointed out today the XTICK_GET keyword to plot,
which returns the values that IDL chose for the tick positions.

That may not solve your problem totally since you want some way to
offset the second set of numbers.  You can use the "!C" direct
graphics formatting code to get a carriage return.  Perhaps this
snippet will help.

  x = findgen(10)
  plot, x, x*x
  axis, xaxis=0, xtickname=['!C10','!C8','!C6','!C4','!C2','!C0']

Have fun,

Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response