1

How do I get the X-range of the "current" graphics object? For example lets assume I create a single plot window:

p = plot(/test, xrange=[10,35])

Now, without using the reference to p how do I get the X-range ([10,35]) of this plot window?

jitter
  • 346
  • 5
  • 12
  • what do you mean by *"without using the reference to p"*? if you have the plot object assigend, you could just do `p.XRANGE`... – FObersteiner Oct 14 '20 at 13:46
  • 1
    I'm not sure if this works when using the plot function (as opposed to the plot procedure), but you may be able to use `!x.crange` – Steve G Oct 14 '20 at 16:43
  • @MRFuppes For example the case when I have overwritten p. – jitter Oct 14 '20 at 19:21
  • @SteveG Sadly this contains [0,0] when using the plot function. – jitter Oct 14 '20 at 19:22
  • well, then avoid overwriting the variable ;-) for example you could store plot objects in an `OBJARR` and obtain properties if needed. just make sure to add a check if the object still exists (might have been closed), see `OBJ_VALID`. – FObersteiner Oct 14 '20 at 19:25

0 Answers0