Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

issue with plotting data

Asked by Arun Badigannavar on 26 Mar 2013

I have graph plotting 4 variables value every update,,,up to i=10 only variables will be plotted and after some time third and fourth vqariables vlaue is plotted on plot,,,for plotting third and forth variable i will make third and fourth variable zero,,,,so problem is wen i plot first and second variables,,,third and fourth variable is also plotted on zero point,,,so how to make third and fourth point visible,,wen those get values?

2 Comments

Azzi Abdelmalek on 26 Mar 2013

Arun, to clarify what you want, post your code, and explain when you want to plot third, fourth,...,tenth.

Arun Badigannavar on 26 Mar 2013
x=1:10;
y=1:10;
f1=figure(1);
plot(x,y,'g*')
z=21:30;
plot(x,z,'r*')
This plot replaces (x,y),,,i want keep first plot and again plot(x,z),,
Arun Badigannavar

Tags

Products

No products are associated with this question.

1 Answer

Answer by Suleyman Deveci on 26 Mar 2013

use "hold on" between two plots

0 Comments

Suleyman Deveci

Contact us