<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478</link>
    <title>MATLAB Central Newsreader - label points</title>
    <description>Feed for thread: label points</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 09 Feb 2008 19:28:02 -0500</pubDate>
      <title>label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414023</link>
      <author>Steve </author>
      <description>Is it possible to label only specific values when using&lt;br&gt;
plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
only the maximums and minimums labeled with (x,y_max).  Thanks!</description>
    </item>
    <item>
      <pubDate>Sat, 09 Feb 2008 19:51:45 -0500</pubDate>
      <title>Re: label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414025</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fokus2$c5h$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Steve  &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;Is it possible to label only specific values when using&lt;br&gt;
&amp;gt;plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
&amp;gt;only the maximums and minimums labeled with (x,y_max).  Thanks!&lt;br&gt;
&lt;br&gt;
Yes. Set the XTick and YTick properties each to a vector of only&lt;br&gt;
the values you want labelled.&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;Every intellectual product must be judged from the point of view&lt;br&gt;
&amp;nbsp;&amp;nbsp;of the age and the people in which it was produced.&quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Walter Horatio Pater</description>
    </item>
    <item>
      <pubDate>Sat, 09 Feb 2008 20:20:17 -0500</pubDate>
      <title>Re: label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414031</link>
      <author>Steve </author>
      <description>Thanks, I'll do that for now.  But is there a way to do it&lt;br&gt;
within the code itself?  If I have many points of interest,&lt;br&gt;
this could be aggravating...&lt;br&gt;
&lt;br&gt;
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fol08h$l7n$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;fokus2$c5h$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; Steve  &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;Is it possible to label only specific values when using&lt;br&gt;
&amp;gt; &amp;gt;plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
&amp;gt; &amp;gt;only the maximums and minimums labeled with (x,y_max). &lt;br&gt;
Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yes. Set the XTick and YTick properties each to a vector&lt;br&gt;
of only&lt;br&gt;
&amp;gt; the values you want labelled.&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;   &quot;Every intellectual product must be judged from the&lt;br&gt;
point of view&lt;br&gt;
&amp;gt;   of the age and the people in which it was produced.&quot;&lt;br&gt;
&amp;gt;                                               -- Walter&lt;br&gt;
Horatio Pater</description>
    </item>
    <item>
      <pubDate>Sat, 09 Feb 2008 20:24:01 -0500</pubDate>
      <title>Re: label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414032</link>
      <author>Steve </author>
      <description>Sorry, let me clarify.  The axes are fine, but I'd like to&lt;br&gt;
add markers to specific values (not at each data point).  In&lt;br&gt;
addition, if possible, I'd like to have the (x,y)&lt;br&gt;
coordinates at each of these points of interest labeled&lt;br&gt;
right on the plot.  Thanks!&lt;br&gt;
&lt;br&gt;
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in&lt;br&gt;
message &amp;lt;fol08h$l7n$1@canopus.cc.umanitoba.ca&amp;gt;...&lt;br&gt;
&amp;gt; In article &amp;lt;fokus2$c5h$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
&amp;gt; Steve  &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;Is it possible to label only specific values when using&lt;br&gt;
&amp;gt; &amp;gt;plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
&amp;gt; &amp;gt;only the maximums and minimums labeled with (x,y_max). &lt;br&gt;
Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Yes. Set the XTick and YTick properties each to a vector&lt;br&gt;
of only&lt;br&gt;
&amp;gt; the values you want labelled.&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt;   &quot;Every intellectual product must be judged from the&lt;br&gt;
point of view&lt;br&gt;
&amp;gt;   of the age and the people in which it was produced.&quot;&lt;br&gt;
&amp;gt;                                               -- Walter&lt;br&gt;
Horatio Pater</description>
    </item>
    <item>
      <pubDate>Sat, 09 Feb 2008 21:36:51 -0500</pubDate>
      <title>Re: label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414035</link>
      <author>dvt</author>
      <description>&amp;nbsp;&amp;gt;&amp;gt; Steve  &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt;&amp;gt; Is it possible to label only specific values when using&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt;&amp;gt; plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt;&amp;gt; only the maximums and minimums labeled with (x,y_max).&lt;br&gt;
&lt;br&gt;
Steve wrote:&lt;br&gt;
&amp;gt; Sorry, let me clarify.  The axes are fine, but I'd like to&lt;br&gt;
&amp;gt; add markers to specific values (not at each data point).  In&lt;br&gt;
&amp;gt; addition, if possible, I'd like to have the (x,y)&lt;br&gt;
&amp;gt; coordinates at each of these points of interest labeled&lt;br&gt;
&amp;gt; right on the plot.  Thanks!&lt;br&gt;
&lt;br&gt;
Try something like this:&lt;br&gt;
&lt;br&gt;
% sample data; you already have x and y plotted&lt;br&gt;
x = rand(10,1);&lt;br&gt;
y = rand(10,1);&lt;br&gt;
plot(x,y,'o')&lt;br&gt;
&lt;br&gt;
% this labels the data point(s) with the largest x and y values&lt;br&gt;
% these labels might overlap if one data point has the maximum x and y&lt;br&gt;
% of the set&lt;br&gt;
text(max(x),y(x==max(x)),' \leftarrow max x')&lt;br&gt;
text(x(y==max(y)),max(y),' \leftarrow max y')</description>
    </item>
    <item>
      <pubDate>Sat, 09 Feb 2008 21:54:01 -0500</pubDate>
      <title>Re: label points</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/163478#414038</link>
      <author>Steve </author>
      <description>Perfect, thanks!&lt;br&gt;
&lt;br&gt;
dvt &amp;lt;dvt+usenet@psu.edu&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fol6dm$mts$1@f04n12.cac.psu.edu&amp;gt;...&lt;br&gt;
&amp;gt;  &amp;gt;&amp;gt; Steve  &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;  &amp;gt;&amp;gt;&amp;gt; Is it possible to label only specific values when using&lt;br&gt;
&amp;gt;  &amp;gt;&amp;gt;&amp;gt; plot() in Matlab?  i.e. I have many data points but want&lt;br&gt;
&amp;gt;  &amp;gt;&amp;gt;&amp;gt; only the maximums and minimums labeled with (x,y_max).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Steve wrote:&lt;br&gt;
&amp;gt; &amp;gt; Sorry, let me clarify.  The axes are fine, but I'd like to&lt;br&gt;
&amp;gt; &amp;gt; add markers to specific values (not at each data point).  In&lt;br&gt;
&amp;gt; &amp;gt; addition, if possible, I'd like to have the (x,y)&lt;br&gt;
&amp;gt; &amp;gt; coordinates at each of these points of interest labeled&lt;br&gt;
&amp;gt; &amp;gt; right on the plot.  Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Try something like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % sample data; you already have x and y plotted&lt;br&gt;
&amp;gt; x = rand(10,1);&lt;br&gt;
&amp;gt; y = rand(10,1);&lt;br&gt;
&amp;gt; plot(x,y,'o')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % this labels the data point(s) with the largest x and y&lt;br&gt;
values&lt;br&gt;
&amp;gt; % these labels might overlap if one data point has the&lt;br&gt;
maximum x and y&lt;br&gt;
&amp;gt; % of the set&lt;br&gt;
&amp;gt; text(max(x),y(x==max(x)),' \leftarrow max x')&lt;br&gt;
&amp;gt; text(x(y==max(y)),max(y),' \leftarrow max y')</description>
    </item>
  </channel>
</rss>

