<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251933</link>
    <title>MATLAB Central Newsreader - Obtain a vertical line at the point clicked to show selected segments</title>
    <description>Feed for thread: Obtain a vertical line at the point clicked to show selected segments</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>Fri, 22 May 2009 02:12:01 -0400</pubDate>
      <title>Obtain a vertical line at the point clicked to show selected segments</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251933#651568</link>
      <author>Mohammed Islam</author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I have been trying to find out a way to draw a vertical line after I click on certain area on a plot to distinguish between selected segments on a timeseries without much success. Could anyone please help me with this or know where'd I get resrouce regarding this? The purpose of this is to make sure when I select segment from a timeseries, I don't select a portion twice or they dont overlap. I highly appreiciate your time and effort. Have a good one.</description>
    </item>
    <item>
      <pubDate>Fri, 22 May 2009 16:09:06 -0400</pubDate>
      <title>Re: Obtain a vertical line at the point clicked to show selected segments</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/251933#651691</link>
      <author>Sadik </author>
      <description>Hello Mohammed,&lt;br&gt;
&lt;br&gt;
If you have your plot ready, you could do the following. But IMPORTANT: You need to press enter after you make a SINGLE selection. If you click more than once, you may have trouble. If you would like to plot multiple vertical lines, then you had better put this in a for loop or the like, and each time make a single selection and press enter. This code draws a vertical red line.&lt;br&gt;
&lt;br&gt;
[x,y] = ginput;  %&lt;br&gt;
yLims = get(gca,'YLim');&lt;br&gt;
hold on&lt;br&gt;
line([x,x],yLims,'Color','red')&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;lt;gv51lh$k6s$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have been trying to find out a way to draw a vertical line after I click on certain area on a plot to distinguish between selected segments on a timeseries without much success. Could anyone please help me with this or know where'd I get resrouce regarding this? The purpose of this is to make sure when I select segment from a timeseries, I don't select a portion twice or they dont overlap. I highly appreiciate your time and effort. Have a good one.</description>
    </item>
  </channel>
</rss>

