Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hi, Does anyone know of a relatively easy way to make a plot in IDL have two different x-axes or scales? It is rather common in textbooks and journal articles to see two curves on the same plot, sharing the same y-axis scaling, but with different corresponding x-axes (usually one on top and one on the bottom). This could be done brute force, of course, but I was wondering if there were any library routines to do this in a general manner, instead of on a case-by-case basis. Thanks for any advice, Frank
eparvier@tramp.Colorado.EDU (EPARVIER FRANCIS G) writes: < Does anyone know of a relatively easy way to make a plot in IDL have two different x-axes or scales? It is rather common in textbooks and journal articles to see two curves on the same plot, sharing the same y-axis scaling, but with different corresponding x-axes (usually one on top and one on the bottom). This could be done brute force, of course, but I was wondering if there were any library routines to do this in a general manner, instead of on a case-by-case basis.> This can be done fairly easily with a combination of calls to PLOT and AXIS with various keywords, such as ;plot first set of data with x axis on bottom, y axis on left, no top axis plot,x,y,/noerase,xstyle=8 ;plot second set of data with x axis on top, same y axis plot,x2,y,/noerase,xstyle=4,/noerase axis,xaxis=1 There are a lot of options with these two procedures, so you should be able to get what you want. Jennifer Dungan jennifer@vessna.arc.nasa.gov MS 242-4 NASA Ames Research Center