How exactly is the first vertex of a patch in surf determined?
2 次查看(过去 30 天)
显示 更早的评论
In the documentation for the surf command it is stated that for faceColor = 'flat', "The color value at the first vertex of each face (in the positive x and y directions) determines the color for the entire face."
Paired with the accomanying drawing, I completely understand how this work for a rectangular grid. However, I would like to know what exactly is the 'first vertex' in case of a non-rectangular grid. I'm trying to make a polar plot with surf, and this is vital information.
PS, I tried to find out through the source of surf, but it seems like the magic happens in a .p file.
Thank you
4 个评论
Steven Lord
2020-9-23
As far as I'm aware it's not possible to create a surf plot on a polaraxes.
>> ax = polaraxes;
>> [x, y, z] = peaks;
>> surf(ax, x, y, z)
Error using matlab.graphics.chart.primitive.Surface
Surface cannot be a child of PolarAxes.
Error in surf (line 145)
hh = matlab.graphics.chart.primitive.Surface(allargs{:});
Trying to create a surf plot on an axes containing an older style polar plot probably won't do what you expect or want.
>> th = 0:0.1:2*pi;
>> r = 1:length(th);
>> h = polar(th, r);
>> ax = ancestor(h, 'axes');
>> hold on
>> surf(ax, x, y, z)
So can you explain a bit about how you are "trying to make a polar plot with surf"?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!