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: How to extract data points from a plot (can't use 'ginput')
Replies: 6   Last Post: Jan 31, 2013 5:26 AM

Advanced Search

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

Posts: 18,038
Registered: 12/7/04
Re: How to extract data points from a plot (can't use 'ginput')
Posted: Aug 25, 2008 11:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Forrest " <> wrote in message
> "Steven Lord" <> wrote in message
> <g8ug33$u1$>...

>> "Forrest " <> wrote in message
>> news:g8uf2j$j5s$

>> > I'm using the 'psd' function to take the power spectral
>> > density of a waveform. Afterwards I can view the plot

> of
>> > the psd, however, I can't seem to find the data that is
>> > being plotted from the psd. I have the plot, but I

> can't
>> > find the x and y coordinates. I can't use ginput
> because
>> > there are 5000 data points.
>> Get a handle to the line that PSD plotted using

> FINDOBJ. Once you have that
>> handle, GET the XData and YData properties.
>> --
>> Steve Lord

> Steve,
> I'm not very familiar with 'findobj'. Can you walk me
> through how to do this.

The first example from DOC FINDOBJ should do it, as long as the line created
by PSD is the only line on the current axes:

h = findobj(gca,'Type','line')

If it isn't, you'll need to specify another property that distinguishes the
PSD-created lines from the others. Take a look at the other documentation
examples for ideas of some of the properties you can use for that purpose.

Steve Lord

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.