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: gname problem
Replies: 7   Last Post: May 23, 2013 9:01 AM

Advanced Search

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

Posts: 9,850
Registered: 6/7/07
Re: gname problem
Posted: May 22, 2013 7:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 5/18/2013 9:19 AM, Stan24 wrote:
> I've forgotten to add:
> gname(1:10, h1); % returns the wrong handle

Don't understand what you need...gname() returns the handle of the text
objects it makes; they _can't_ be "wrong" excepting you may be

W/ your initial call to plot(),

h1 = plot(1:10, sin(1:10), 'o-');

gname(1:10, h1); puts up the cursor and labels the points on the line
drawn there--don't know what else you want it should do???

h1 is the handle to the line object returned from plot() and so using as
the argument to gname will label those points.

Even if I then use the second scatter() call, the h1 handle correctly
identifies the line from the plot and internal logic requires being
"close enough" to the points on the line that they're identified and
labeled instead of the points of the scatter plot that are in the
general neighborhood.

Looks like working as advertised to me. What are you really after?


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.