Symbol issue superposing plot and pcolor

2 次查看(过去 30 天)
Hi to all
I have some problem superposing plot and pcolor. The symbols I am trying to generate from plot don't appear the way they should once I superpose plot with pcolor.
And this is what I Get and it's aweful as hell. Bob is supposed to be a circle, Alice a triangle, and Charlie a square.
What can I do to correct the problem? Because of confidentiality I can't send the entire code but I can send you the way I generated the figure:
plot(YBob,XBob,'Om',YAlice,XAlice,'^y',YCharlie,XCharlie,'sg','LineWidth',5)
legend('Bob','Alice','Charlie')
title('Distribution Cartésienne')
xlabel('Distance (m)')
ylabel('Distance (m)')
hold on
[Xeve,Yeve]=meshgrid((yDeb:res:yFin),(xDeb:res:xFin));
pcolor(Xeve,Yeve,(PerrE));
shading interp
colorbar
axis equal square
hold off

采纳的回答

Kelly Kearney
Kelly Kearney 2014-5-20
When you add pcolor plots to an axis, which changes/sets the shading scheme used by the axis, it can sometimes change the way that the properties of other surface objects are interpreted. I've never quite figured out the rhyme or reason for this, but I've found the easiest solution is to manually set all the properties after everything is in place.
In your case, try adding these lines at the end of your code:
set(h, 'linewidth', 5, 'markersize', 15);
set(h, {'markeredgecolor', 'marker'}, {'m' 'o'; 'y' '^'; 'g' 's'});
uistack(h, 'top');
(I increased the marker size because otherwise it's almost impossible to see the marker shape with such a thick line width... is that really what you want?)
On my computer, changing the renderer via
set(gcf, 'renderer', 'zbuffer')
also makes things look a bit better, but that may be OS/graphics card dependent.
  2 个评论
Stanislav Stefanovski
Hi
I am not sure about how to use "set" correctly.
I tried and I receive the following error :
"Value cell array handle dimension must match handle vector length"
no matter how I write it
Stanislav Stefanovski
I found out what's the problem !
:)
Thank you a lot !!!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by