<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: MATLAB Basics: Setting edge color for large surface plots</title>
	<link>http://blogs.mathworks.com/pick/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/</link>
	<description>&#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=969735&#38;objectType=author"&#62;Bob&#60;/a&#62;, &#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1093599&#38;objectType=author"&#62;Brett&#60;/a&#62; &#38; &#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1094142&#38;objectType=author"&#62;Jiro&#60;/a&#62; share favorite user-contributed submissions from the File Exchange.</description>
	<pubDate>Mon, 23 Nov 2009 00:23:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Matt Fig</title>
		<link>http://blogs.mathworks.com/pick/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/#comment-12440</link>
		<dc:creator>Matt Fig</dc:creator>
		<pubDate>Thu, 14 Aug 2008 19:02:33 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/#comment-12440</guid>
		<description>I often want the high shape resolution given by large data sets for a surface, but also want to see the net over the surface.  This is useful for publication/presentation purposes.  Since, as you show, using the net as is will make the whole surface black, I modify it by doing something like this:

&lt;pre&gt; &lt;code&gt;
a = peaks(1000);
opengl software
h = surf(a);
set(h, 'edgecolor','none')
hold on
x = 1:1000;
k = [1 0:20:1000];  % The values to keep.
k(2) = [];
st = setxor(x,k);
x(st) = NaN;  % Set most values so they won't plot.
[xx,yy] = meshgrid(x);
idx1 = isnan(xx)&#124;isnan(yy);
a(idx1) = NaN;  
idx2 = ~isnan(xx)&#38;~isnan(yy);
xx = reshape(xx(idx2),51,51);  % Reshape these guys.
yy = reshape(yy(idx2),51,51);
aa = reshape(a(idx2),51,51);
m = mesh(xx,yy,aa+.04);  % Create the net.
set(m,'edgecolor','black','facealpha',0,'linewidth',1)
set(1,'units','normalized','position',[.05 .05 .85 .85])
&lt;/code&gt; &lt;/pre&gt;

Note that I added a small value to the aa matrix.  This is because if left alone the net will have patches that are blocked by the surface, mainly at the peaks.  Of course it makes the underside of the surface look worse in this regard, but as I said, I use this technique to get a static image for publication/presentation purposes.</description>
		<content:encoded><![CDATA[<p>I often want the high shape resolution given by large data sets for a surface, but also want to see the net over the surface.  This is useful for publication/presentation purposes.  Since, as you show, using the net as is will make the whole surface black, I modify it by doing something like this:</p>
<pre> <code>
a = peaks(1000);
opengl software
h = surf(a);
set(h, 'edgecolor','none')
hold on
x = 1:1000;
k = [1 0:20:1000];  % The values to keep.
k(2) = [];
st = setxor(x,k);
x(st) = NaN;  % Set most values so they won't plot.
[xx,yy] = meshgrid(x);
idx1 = isnan(xx)|isnan(yy);
a(idx1) = NaN;
idx2 = ~isnan(xx)&amp;~isnan(yy);
xx = reshape(xx(idx2),51,51);  % Reshape these guys.
yy = reshape(yy(idx2),51,51);
aa = reshape(a(idx2),51,51);
m = mesh(xx,yy,aa+.04);  % Create the net.
set(m,'edgecolor','black','facealpha',0,'linewidth',1)
set(1,'units','normalized','position',[.05 .05 .85 .85])
</code> </pre>
<p>Note that I added a small value to the aa matrix.  This is because if left alone the net will have patches that are blocked by the surface, mainly at the peaks.  Of course it makes the underside of the surface look worse in this regard, but as I said, I use this technique to get a static image for publication/presentation purposes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petr Pošík</title>
		<link>http://blogs.mathworks.com/pick/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/#comment-12433</link>
		<dc:creator>Petr Pošík</dc:creator>
		<pubDate>Wed, 13 Aug 2008 20:01:31 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/#comment-12433</guid>
		<description>Hi Doug.

Personally I tend to use the &lt;pre&gt;shading flat, shading interp, shading faceted&lt;/pre&gt; commands. They take care of greater number of objects automatically, but internally use similar commands you presented in the video.

Regards, Petr</description>
		<content:encoded><![CDATA[<p>Hi Doug.</p>
<p>Personally I tend to use the
<pre>shading flat, shading interp, shading faceted</pre>
</p><p> commands. They take care of greater number of objects automatically, but internally use similar commands you presented in the video.</p>
<p>Regards, Petr</p>
]]></content:encoded>
	</item>
</channel>
</rss>
