Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to plot continuous color plot in matlab representing a 2D array

Status
Not open for further replies.

fparveen

Junior Member level 1
Junior Member level 1
Joined
Jun 10, 2018
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
193
Hello,

I am trying to plot a 2D matrix for image reconstruction of head interior. I am using matlab contourf function. But the color plot doesn't look so good to me. Is there any suggestion for any other function/ method for this purpose?

Thanks in Advance.
 

weetabixharry

Full Member level 4
Full Member level 4
Joined
Oct 9, 2013
Messages
232
Helped
69
Reputation
142
Reaction score
73
Trophy points
1,318
Location
Sweden
Activity points
3,460
Have a look at these functions for making good 3D surface plots. Try rotating the 3D view (in the MATLAB figure) to get the best angle.

Code Matlab M - [expand]
1
2
surf(X);
shading interp;



The shading interp part makes it look much smoother.

If you're not happy with the colours in general, you can change the colourmap. For example:


Code Matlab M - [expand]
1
2
contourf(X);
colormap(pink);

 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top