MATLAB Answers

Piyush Gupta

How can I plot Multiple graphs for the same figure?

Asked by Piyush Gupta
on 19 Sep 2013

I've used he plot function to plot data for a particular day. As the data for the whole day is irrelevant to me I want to plot that data only for the time period when the value of y axis goes above a certain value ( example 10 %) and stop plotting when this value goes below a certain level (example 2%). The plot should start 5 minutes before the value goes above 10 and should stop 5 mins after the value goes below 2. for example the value of y goes 8 times above 10 in the entire day for 20 mins each, I want to plot 8 different plots for 30 minutes duration ( 5 before & 5 after for the entire day). I request you to please give ur suggestions to do the same

  1 Comment

Jan Simon
on 19 Sep 2013

The description as text is harder to understand than a tiny example. E.g. "10%" is clear for you, but the readers of the forum have to guess from which quantity 10% must be taken. The same for "5 min": It matters if you store the time in minutes, as date-vector, date-string or in seconds. "8 different plots" could mean 8 lines in one diagram, 8 subplots or 8 figures.

Please post what you have tried so far and ask a specific questions. Otherwise providing a suggestion for a solution would be inefficient and based on guess the details.


No products are associated with this question.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!