Author Topic: scatter data to contour plot  (Read 1711 times)

Offline dinesh.iitk

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
scatter data to contour plot
« on: September 10, 2010, 07:29:01 PM »
Hi,

I have particles scatter data input file in the form as: [x y z p] where x,y,z, are coordinates and p is force on particle. I want to make contour plot of this force P.

It is possible , Please help me out if anybody have any idea.

Thanks in advance



Offline hero_hont

  • Newbie
  • *
  • Posts: 12
  • Matlab Forum
    • View Profile
Re: scatter data to contour plot
« Reply #1 on: September 11, 2010, 04:34:37 PM »
If plot in the matlab you can use help in the maltab.
This is code demo:
x = -pi:.1:pi;y = sin(x);
p = plot(x,y)
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'})
xlabel('-\pi \leq \Theta \leq \pi')ylabel('sin(\Theta)')
title('Plot of sin(\Theta)')% \Theta appears as a Greek symbol (see String (http://www.matlabtutorials.com/mathforum/index.php?action=redirect;url=http://www.mathworks.com/help/techdoc/ref/text_props.html#String))% Annotate the point (-pi/4, sin(-pi/4))text(-pi/4,sin(-pi/4),'\leftarrow sin(-\pi\div4)',...
     'HorizontalAlignment','left')% Change the line color to red and% set the line width to 2 points set(p,'Color','red','LineWidth',2)

Matlab and SimuLink Development Forum

Re: scatter data to contour plot
« Reply #1 on: September 11, 2010, 04:34:37 PM »