+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 4
    Points: 187, Level: 2

    Join Date
    Jun 2018
    Posts
    8
    Helped
    0 / 0
    Points
    187
    Level
    2

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

    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.

    •   AltAdvertisment

        
       

  2. #2
    Full Member level 4
    Points: 2,174, Level: 10
    Achievements:
    Created Blog entry

    Join Date
    Oct 2013
    Location
    Sweden
    Posts
    204
    Helped
    68 / 68
    Points
    2,174
    Level
    10
    Blog Entries
    6

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

    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);



--[[ ]]--