How to represent a 2D plot using color plot
Show older comments
I have the following two variables: x (it represent depth of a material from the surface), y (it represnt a variable which changes as the depth of the material increases)
x=[ 0 0.04 0.164 1 2 3 4 5 6 6.052 7 7.965 8 9 10 ]
y=[ 6201.67 8328.37 6201.67 3476.751 2432.011 1820.878 1387.272 1050.941 776.1486 763.13 543.7965 349.14 342.5326 165.0053 6.201674 ]
I have made a plot of y against y. However, it is required to made a color plot like varying color for y (based on its magnitude) as the depth increases ie. x. For high values of y a darker color which decreses as the value of y decreases. An example plot is attached below for illustration only. Please help me
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!