comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Plot multiple axes with log and linear scales
items: Re: Plot multiple axes with log and linear scales

Plot multiple axes with log and linear scales
type: item
description: Hey guys, I need to make a plot with multiple x-axes. I've done this before without any trouble when both axes had a linear scale, and so I would use the axis command to create the second plot, and just set the xrange keyword to be whatever I needed it to be. Now however things are more complicated, because one axis is a linear scale, and the other axis is sorta kinda logarithmic scale. There is a one-to-one relationship between the axes, but the relationship is not in the least bit simple. Basically, I need a way to tell IDL, for these values on the first x-axis, plot these values for the second x-axis. Anyone know how to do this?
creator: Conor
date: 2009-07-29T15:54:30-00:00

Re: Plot multiple axes with log and linear scales
type: item
description: 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
creator: chris_torrence@NOSPAM
date: 2014-10-08T20:37:08-00:00

Re: Plot multiple axes with log and linear scales
type: item
description: On Wednesday, October 8, 2014 10:37:10 PM UTC+2, Chris Torrence wrote: > 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 Dear Chris, Thanks for your prompt response. Yes, I figur…
creator: jens8472
date: 2014-10-09T10:12:08-00:00

Re: Plot multiple axes with log and linear scales
type: item
description: On Thursday, October 9, 2014 12:12:10 PM UTC+2, jens...@gmail.com wrote: > On Wednesday, October 8, 2014 10:37:10 PM UTC+2, Chris Torrence wrote: >> 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 …
creator: JDS
date: 2014-12-03T15:28:45-00:00