This is a followon to Semi-transparent markers in Matlab Figures , where one answer shows how to use patch
to generate semitransparent circles at each data point. What I want to do is use the axes' limits to adjust the circles so that they plot as circles when the x and y ranges are significantly different, causing true circles to plot as ellipses. For the record, I don't have MATLAB 2014/15 so can't use the "hidden" handles discussed at the linked question.
So, here's the problem: I want to query the current axes for their limits via xlim
and ylim
and use the results to adjust the patch
circle shapes. But if there is no figure window, xlim
creates a new one. Is there a command in MATLAB that I can use to determine whether there is a figure window in existence ? My intent is to plot the patch
objects in an existing graph when one exists.
If my approach is worthy of thedailywtf, please suggest a more sensible way to do what I want to do, i.e. plot objects which are visually circles in a graph with arbitrary x- and y- axis ranges.