Extracting plot boundaries [message #86066] |
Mon, 30 September 2013 01:12  |
Beau Bellamy
Messages: 2 Registered: September 2013
|
Junior Member |
|
|
This is just a question regarding aesthetics.
I am plotting some time series data and i am adding labels for sections of the data that are related to when the data was collected. I want to make it so the labels are always in the same place relative to the boundaries (mostly the top). I am currently using yrange to set the boundaries, but IDL is optimizing the space somehow and the value i set isn't the top boundary of the plot. Is there a way to extract the top boundary, i.e. max Y value, of a plot?
|
|
|
Re: Extracting plot boundaries [message #86067 is a reply to message #86066] |
Mon, 30 September 2013 01:21   |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Monday, September 30, 2013 10:12:49 AM UTC+2, Beau Bellamy wrote:
> This is just a question regarding aesthetics.
>
> I am plotting some time series data and i am adding labels for sections of the data that are related to when the data was collected. I want to make it so the labels are always in the same place relative to the boundaries (mostly the top). I am currently using yrange to set the boundaries, but IDL is optimizing the space somehow and the value i set isn't the top boundary of the plot. Is there a way to extract the top boundary, i.e. max Y value, of a plot?
Hi,
Just a quick guess: did you use YSTYLE = 1? This will set the range to exactly what you want (see http://www.exelisvis.com/docs/graphkeyw.html#graphkeyw_32887 78166_332116).
Alternatively, you can have a look at the variable !y.crange. This will be set after you plot. See http://www.exelisvis.com/docs/Graphics_System_Variable.html
What might also be useful when plotting is setting the /ynozero keyword to avoid including the 0 value on y.
If you are using function graphics, I believe that similar solutions are available.
Regards,
Helder
|
|
|
Re: Extracting plot boundaries [message #86070 is a reply to message #86066] |
Mon, 30 September 2013 03:22  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Den måndagen den 30:e september 2013 kl. 10:12:49 UTC+2 skrev Beau Bellamy:
> This is just a question regarding aesthetics.
>
> I am plotting some time series data and i am adding labels for sections of the data that are related to when the data was collected. I want to make it so the labels are always in the same place relative to the boundaries (mostly the top). I am currently using yrange to set the boundaries, but IDL is optimizing the space somehow and the value i set isn't the top boundary of the plot. Is there a way to extract the top boundary, i.e. max Y value, of a plot?
Maybe al_legend is useful for what you are trying to do.
http://www.exelisvis.com/docs/al_legend.html
|
|
|