<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237389</link>
    <title>MATLAB Central Newsreader - Plotting 3D graph in a plane</title>
    <description>Feed for thread: Plotting 3D graph in a plane</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>Sun, 12 Oct 2008 01:45:43 -0400</pubDate>
      <title>Plotting 3D graph in a plane</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237389#604817</link>
      <author>kagohaik</author>
      <description>I am new in matlab and I would like to plot a 3D graph in a 2D graph.&lt;br&gt;
The x and y axis are representing the independent variables. There are only two values for the dependent variables, which are 2,3, in which I would like to represent it with different symbols in the 2D graph. How am I going about doing this?&lt;br&gt;
&lt;br&gt;
Thanks in advance.</description>
    </item>
    <item>
      <pubDate>Sun, 12 Oct 2008 04:51:36 -0400</pubDate>
      <title>Re: Plotting 3D graph in a plane</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237389#604823</link>
      <author>Walter Roberson</author>
      <description>kagohaik wrote:&lt;br&gt;
&amp;gt; I am new in matlab and I would like to plot a 3D graph in a 2D graph.&lt;br&gt;
&amp;gt; The x and y axis are representing the independent variables. There are only two values &lt;br&gt;
&amp;gt; for the dependent variables, which are 2,3, in which I would like to represent it with &lt;br&gt;
&amp;gt; different symbols in the 2D graph. How am I going about doing this?&lt;br&gt;
&lt;br&gt;
I suggest using scatter(). It would be easier to use different colors rather than different&lt;br&gt;
symbols, but here is how you can do it using different symbols:&lt;br&gt;
&lt;br&gt;
xt = x;&lt;br&gt;
xt(z~=2) = nan;&lt;br&gt;
scatter(xt,y,SymbolSize,'o');   %'o' marker for first value&lt;br&gt;
xt = x;&lt;br&gt;
xt(z~=3) = nan;&lt;br&gt;
scatter(xt,y,SymbolSize,'+')    %'+' marker for second value&lt;br&gt;
&lt;br&gt;
If you add the color information you can obviously generalize this to as many&lt;br&gt;
distinctive colour / marker combinations as you can come up with (though&lt;br&gt;
if you were to get into that, you'd -probably- be wanting to use value ranges&lt;br&gt;
rather than exact comparisons)&lt;br&gt;
&lt;br&gt;
xt = x;&lt;br&gt;
xt(abs(z-7.2) &amp;gt; 4*eps(7.2)) = nan;   %preserve only values really close to 7.2</description>
    </item>
  </channel>
</rss>

