The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Adding line/rectangle to an image in a axis on a GUI
Replies: 2   Last Post: Oct 31, 2012 3:25 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 16
Registered: 10/31/12
Re: Adding line/rectangle to an image in a axis on a GUI
Posted: Oct 31, 2012 2:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I may have found the answer by trying some different search terms in the newsreader than I had before:

as per:

The following two alternatives seemed to work:
axes(myData.axis1) %alternatively set(myData.figHandle,'CurrentAxes',myData.axis1)

axes(myData.axis1) %alternatively set(myData.figHandle,'CurrentAxes',myData.axis1)

So is the problem that matlab rescales an axis to fit the latest child of it?
I tested this by having matlab remake the image after I made the rectangle:

axes(myData.axis1) %alternatively set(myData.figHandle,'CurrentAxes',myData.axis1)

and the picture showed up normal scale (but without the rectangle)

If anyone has better suggestions for a solution or just a better explanation of what is happening, I'd appreciate it. For now, though, (1) or (2) seem to work.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.