Re: Plot multiple axes with log and linear scales [message #89405 is a reply to message #67515] |
Wed, 08 October 2014 13:37   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, October 8, 2014 7:21:57 AM UTC-6, jens...@gmail.com wrote:
> Thank you guys! After spending hours trying to xtickv myself out of this; the xtickformat strategy really is an eye-opener.
>
>
>
> I would like to add to the complexity, though:
>
> Suppose the function in CONV_AXIS is not a mathematical function; but instead it's data-values corresponding to the other axis?
>
>
>
> Here's my problem:
>
> There are three data vectors: Atmospheric temperature (T), pressure (P) and altitude (A).
>
> I want to plot this data such that T is on the X-axis; and both P and A are on the y-axes; where the A-axis shows the altitude-values corresponding to P. So, I don't want to calculate the A-values using the P-values as input; rather, I have to look up the corresponding values in an array, since I don't know the functional form.
>
>
>
> Furthermore, P is logarithmic while A isn't.
>
>
>
> This suggests I have to interpolate either of the y-axes onto the other; but I don't see how to, exactly.
>
>
>
> The obviously dirty way to do this is to fit the relationship between A and P (approximately exponential) to obtain a functional form; but that's not too neat...
>
>
>
> Thanks so much for any help you could offer!
>
>
>
> Jens
>
>
>
>
Hi Jens,
I might be misunderstanding your problem, but that "conv_axis" is an IDL function that can contain *any* code that you want. It doesn't have to be a mathematical function - it could be a lookup table, it could go out to disk and read in a file for each tick value. It doesn't matter. The only requirement is that given a specific input tick value, it needs to output the corresponding string. How you determine that string is up to you.
Does that help?
-Chris
|
|
|