<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239914</link>
    <title>MATLAB Central Newsreader - Faceted Mesh plots</title>
    <description>Feed for thread: Faceted Mesh plots</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>Tue, 25 Nov 2008 17:43:02 -0500</pubDate>
      <title>Faceted Mesh plots</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239914#613211</link>
      <author>Iain </author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I have been having problems colouring in a mesh plot.  When using the figure editor, it is no problem, I just highlight the input mesh and go to faces (paintpot icon) - faceted(flat) .  I would really like to do this through code, I have tried using 'shading' which I think (thought!) is the correct function for this.  Using a classic Matlab example...&lt;br&gt;
&lt;br&gt;
figure&lt;br&gt;
[X,Y] = meshgrid(-3:.125:3);&lt;br&gt;
Z = peaks(X,Y);&lt;br&gt;
mesh(X,Y,Z);&lt;br&gt;
axis([-3 3 -3 3 -10 5])&lt;br&gt;
&lt;br&gt;
shading faceted&lt;br&gt;
colorbar&lt;br&gt;
&lt;br&gt;
The axis handles should be right as the colorbar call is happy, so I guess I am not using shading correctly.&lt;br&gt;
&lt;br&gt;
Any help much appreciated!!!!&lt;br&gt;
Iain</description>
    </item>
    <item>
      <pubDate>Sun, 30 Nov 2008 07:13:05 -0500</pubDate>
      <title>Re: Faceted Mesh plots</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239914#613949</link>
      <author>Ryan Ollos</author>
      <description>&quot;Iain &quot; &amp;lt;icw26@cam.ac.uk&amp;gt; wrote in message &amp;lt;gghdf5$dk1$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have been having problems colouring in a mesh plot.  When using the figure editor, it is no problem, I just highlight the input mesh and go to faces (paintpot icon) - faceted(flat) .  I would really like to do this through code, I have tried using 'shading' which I think (thought!) is the correct function for this.  Using a classic Matlab example...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; figure&lt;br&gt;
&amp;gt; [X,Y] = meshgrid(-3:.125:3);&lt;br&gt;
&amp;gt; Z = peaks(X,Y);&lt;br&gt;
&amp;gt; mesh(X,Y,Z);&lt;br&gt;
&amp;gt; axis([-3 3 -3 3 -10 5])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; shading faceted&lt;br&gt;
&amp;gt; colorbar&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The axis handles should be right as the colorbar call is happy, so I guess I am not using shading correctly.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any help much appreciated!!!!&lt;br&gt;
&amp;gt; Iain&lt;br&gt;
&lt;br&gt;
You might try File &amp;gt; Generate M-file after you have prepared your figure manually.   This will auto-generate the code for you that prepares the figure.  You can then edit or copy and paste portions of into your custom script.  That might help you figure out where the error is in your code.  I'm not sure what version they added this feature, but I'm guessing it was &amp;gt;= R14.</description>
    </item>
  </channel>
</rss>

