i plotted a graph with three different set of values. how to specify them with manual colors and create a text box by notifying them

2 次查看(过去 30 天)
plot( Y2(1:21,13),Z2plot(1:21,13),Y1(1:21,13),Z1plot(1:21,13),Y(1:21,13),Zplot(1:21,13));
xlabel('\fontsize{20}X - Pixels');
ylabel('\fontsize{20}Z plot');
title('\fontsize{22}integration 64*32');
i want to specify the colors for each different graph and notify them witha textbox to onside of the plot.

回答(1 个)

Image Analyst
Image Analyst 2017-4-27
Try this:
plot(Y2(1:21,13), Z2plot(1:21,13), 'r-', 'LineWidth', 2);
hold on;
plot(Y1(1:21,13), Z1plot(1:21,13), 'g-', 'LineWidth', 2);
plot(Y(1:21,13), Zplot(1:21,13), 'b-', 'LineWidth', 2););
grid on;
xlabel('\fontsize{20}X - Pixels');
ylabel('\fontsize{20}Z plot');
title('\fontsize{22}integration 64*32');
legend('Z2plot', 'Z1plot', 'Zplot');

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by