Matlab | How to beautify the plot line color

MATLAB Plot How to customize colors

Tip: When mapping is preferably saved as Matlab fig format, to facilitate later modifications.

Writing papers is a long process, written after the most important issue is how to make their papers more attractive layout and illustrations, make a little boring papers vivid colors. Here I am confused and recorded some small tips when writing papers.

In the following an example of FIG:
Here Insert Picture Description
X-linspace = (0,5,51);
Yl = SiN (X-);
Y2 = COS (0.5
X-);
the Z 2 = Yl + 0.3 Y2;
Plot (X-, Yl, 'Color' , [1,0,1], 'Marker', ' '); HOLD ON;
Plot (X-, Y2, 'Color', [0.9,0.5,0.5], 'LineWidth', 2); HOLD ON;
Plot ( X-, the Z, 'Color', [0.9,1,0.7], 'Marker', 'Diamond', 'MarkerEdgeColor', 'R & lt')
the xlabel ( 'X', 'the FontSize', 15)
ylabel ( 'Y', 'the FontSize', 15)
title ( 'Color in the Customized the Plot of Matlab', 'Color', [0.7,0,1])
the ratio between brackets represent numbers of three primary colors, the standard color reference may be: Matlab color
Plot the basic commands: plot (x, y, ' property name', property value)
if the property name can not remember how to do? Do not worry, Matlab will give you tips, you can always find what you want.
How to draw a gradient map?
Of course, is to write a for loop on it.

Here Insert Picture Description
All the Clear
the HOLD OFF
X = linspace(-pi/2,pi/2,10)
figure(‘Color’,[0.94,1,0.94])
for i = 1:20
plot(X,(-1)^(i)iX,‘color’,[1-i
0.05,0+i0.03,1-i0.01],‘LineWidth’,0.5+0.05i);
hold on;
end
axis([-pi/2,pi/2,-35,35])

Published an original article · won praise 0 · Views 4

Guess you like

Origin blog.csdn.net/shecan/article/details/103951367