X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Oct 2010 10:52 AM by  anon
how to get the parameters set by system
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
26 Oct 2010 10:52 AM
    While using 'plot' command, and leave these parameters like 'xrange', 'xticks' blank, IDL will automatically set these parameters for you. I want to know how to get these parameters. For example: pro test a=[1,2,3,4,5] & plot,a end The xrange of the figure will be set to [0,4], how I get the value of xrange and use it in the routine later like this: pro test a=[1,2,3,4,5] & plot,a print,xrange end Thanks a lot

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Nov 2010 09:02 AM
    There are two ways to go. I would recommend using the new IDL 8.0 graphics functions instead, which are more customizable and look a lot nicer. For example: p = plot(findgen(10)) xrange = p.xrange yrange = p.yrange You can also set properties like color or line thickness either during initialization or after the plot has been created like this: p.color = 'red' p.thick = 3 You can even change the axis range dynamically like this: p.xrange = [-5,15] However, in answer to your question, it is also possible to get this information from a direct graphic plot as well. You can get the X and Y range like this: plot, findgen(10) xrange = !x.crange yrange = !y.crange -Josh
    You are not authorized to post a reply.