<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264890</link>
    <title>MATLAB Central Newsreader - Is it possible to vectorize LineProperties of a plot object?</title>
    <description>Feed for thread: Is it possible to vectorize LineProperties of a plot object?</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>Wed, 04 Nov 2009 00:58:03 -0500</pubDate>
      <title>Is it possible to vectorize LineProperties of a plot object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264890#691887</link>
      <author>Gustavo Morales</author>
      <description>I'd like to do something like this:&lt;br&gt;
&amp;gt;&amp;gt; X = [1, 2, 3]; Y = [2, 2.5, 2.9]; %for example&lt;br&gt;
&amp;gt;&amp;gt; plot(X,Y,'o','MarkerSize',[20, 10, 15]);&lt;br&gt;
&lt;br&gt;
but it causes an error:&lt;br&gt;
??? Error using ==&amp;gt; plot&lt;br&gt;
Value must be scalar&lt;br&gt;
&lt;br&gt;
I don't want to use a for loop to asign a MarkerSize to each point (xi,yi).&lt;br&gt;
I'd like to vectorize this process. ?Is it possible?</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 11:36:01 -0500</pubDate>
      <title>Re: Is it possible to vectorize LineProperties of a plot object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264890#691999</link>
      <author>Pekka Kumpulainen</author>
      <description>&quot;Gustavo Morales&quot; &amp;lt;gustavo.morales.2000@gmail.com&amp;gt; wrote in message &amp;lt;hcqjir$3vf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I'd like to do something like this:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; X = [1, 2, 3]; Y = [2, 2.5, 2.9]; %for example&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; plot(X,Y,'o','MarkerSize',[20, 10, 15]);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; but it causes an error:&lt;br&gt;
&amp;gt; ??? Error using ==&amp;gt; plot&lt;br&gt;
&amp;gt; Value must be scalar&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I don't want to use a for loop to asign a MarkerSize to each point (xi,yi).&lt;br&gt;
&amp;gt; I'd like to vectorize this process. ?Is it possible?&lt;br&gt;
&lt;br&gt;
One line object can have only one MarkerSize. If you want different sizes you will have to have separate objects for each. Easy to write your own function for that though. &lt;br&gt;
I may have done the same thing somewhere in past, I think, or something very similar anyway..</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 15:08:42 -0500</pubDate>
      <title>Re: Is it possible to vectorize LineProperties of a plot object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264890#692066</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Pekka Kumpulainen&quot; &amp;lt;pekka.nospam.kumpulainen@tut.please.fi&amp;gt; wrote in &lt;br&gt;
message news:hcrov1$r76$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &quot;Gustavo Morales&quot; &amp;lt;gustavo.morales.2000@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;hcqjir$3vf$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&amp;gt; I'd like to do something like this:&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; X = [1, 2, 3]; Y = [2, 2.5, 2.9]; %for example&lt;br&gt;
&amp;gt;&amp;gt; &amp;gt;&amp;gt; plot(X,Y,'o','MarkerSize',[20, 10, 15]);&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; but it causes an error:&lt;br&gt;
&amp;gt;&amp;gt; ??? Error using ==&amp;gt; plot&lt;br&gt;
&amp;gt;&amp;gt; Value must be scalar&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I don't want to use a for loop to asign a MarkerSize to each point &lt;br&gt;
&amp;gt;&amp;gt; (xi,yi).&lt;br&gt;
&amp;gt;&amp;gt; I'd like to vectorize this process. ?Is it possible?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; One line object can have only one MarkerSize. If you want different sizes &lt;br&gt;
&amp;gt; you will have to have separate objects for each. Easy to write your own &lt;br&gt;
&amp;gt; function for that though.&lt;br&gt;
&amp;gt; I may have done the same thing somewhere in past, I think, or something &lt;br&gt;
&amp;gt; very similar anyway..&lt;br&gt;
&lt;br&gt;
If the OP just wants the markers, use SCATTER.&lt;br&gt;
&lt;br&gt;
If the OP wants markers of varying sizes and a line connecting them, use &lt;br&gt;
PLOT without a marker, HOLD ON, and use SCATTER.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
comp.soft-sys.matlab (CSSM) FAQ: &lt;a href=&quot;http://matlabwiki.mathworks.com/MATLAB_FAQ&quot;&gt;http://matlabwiki.mathworks.com/MATLAB_FAQ&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 05 Nov 2009 01:19:02 -0500</pubDate>
      <title>Re: Is it possible to vectorize LineProperties of a plot object?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264890#692249</link>
      <author>Gustavo Morales</author>
      <description>Pekka Kumpulainen and&lt;br&gt;
Steven Lord&lt;br&gt;
&amp;nbsp;Thank you so much! You make me think that there are truly genius at this newsgroup!&lt;br&gt;
Although, I'm not completely satisfied with the scatter() command. It seems that, in practice, there isn't a direct proportion between size and the area, when you visualize the graph...&lt;br&gt;
For example:&lt;br&gt;
&amp;gt;&amp;gt; X = [0, 3, 2]; Y = [2, -2, 8];&lt;br&gt;
&amp;gt;&amp;gt; ri = [0.1, 0.2, 10]; Ai = pi*ri.^2; Factor = 100;&lt;br&gt;
&amp;gt;&amp;gt; scatter(X,Y,Factor*Ai);&lt;br&gt;
&lt;br&gt;
If you, for example, empirically determines that Factor = 100 for small markers (r = 0.1 and 0.2), when you want to plot big markers (r = 10), those markers don't agree with the observed plot&lt;br&gt;
&lt;br&gt;
Thank you for your help!&lt;br&gt;
Regards from Venezuela!</description>
    </item>
  </channel>
</rss>

