X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Oct 2014 07:28 AM by  anon
Second axis with non-linear coord_transfrom ?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:1
New Member


--
16 Oct 2014 07:28 AM
    I'm trying to create a plot which has a second x-axis which has a non-linear relationship to the main x-axis. This is straightforward to do with the plot and axis procedure (see below) but seems impossible with the new graphics axis since it either sticks to the first axis' data units or only allows a linear coord-transform. Is there anyway around this or is this capability not available yet? Procedure code example (I could just take the log of x and x2 to work with the new graphics but looking for a more general solution): x=10d^(findgen(41)*0.125) y=1.0/(1.0+x*1e-3) x2=10d^((alog10(x)-15.)/1.3) plot,x,y,/xlog,xstyle=9 axis,xaxis=1,xlog=1,xrange=[x2[0],x2[40]],xstyle=1

    Deleted User



    New Member


    Posts:
    New Member


    --
    14 Nov 2014 03:36 PM
    One possible solution is to generate a hidden plot in the same window and then create an axis to it. For example: x=10d^(findgen(41)*0.125) y=1.0/(1.0+x*1e-3) x2=10d^((alog10(x)-15.)/1.3) p = plot(x,y,/xlog,axis_style=1) p2= plot(x2,y,/xlog,/current,/hide,axis_style=0) a = axis('x',location='top', target=p2, axis_range=[x2[0],x2[40]], /log)
    You are not authorized to post a reply.