X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 20 Nov 2014 08:35 AM by  anon
How to determine space needed to display axis info?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
20 Nov 2014 08:35 AM
    We're using IDL 7.0 from a C++ application executing .pro files. I'm looking at legacy .pro code that sets up a plot using Window, View, and Model objects. I can see where the view size is getting set via the VIEWPLANE_RECT property. It currently expands the x coords to allow for an extra %15 of the total xrange for the plot on both left and right sides to allow for axis info. We then place the left side axis at the first data point specified in the x range so that it stays visible as the data is zoomed in. This all works fine if that 15% is big enough to show the axis info, otherwise it gets clipped. I tried to get the size of the IDLgrAxis object using the XRANGE property after other elements were added to it (like title text) but before the draw was executed, it showed 0,0. So my question is....is there any way to get the size that the IDLgrAxis object will need to display, before it actually gets displayed?

    Deleted User



    New Member


    Posts:
    New Member


    --
    20 Nov 2014 12:19 PM
    I found the answer to my question: yaxisDims=oWindow->GetTextDimensions(yaxis) This will get the dimensions of the axis (in data units), but make sure you call this after the axis gets added to the window object.
    You are not authorized to post a reply.