Clear Filters
Clear Filters

Edit/deleted the question

2 views (last 30 days)
-- on 30 Nov 2017
Answered: Image Analyst on 15 Jun 2023
  1 Comment
Stephen23 on 15 Jun 2023
Original question by Nadiya Khosravi retrieved from Google Cache:
How to make a break on x axis and have two sets of values?
hi i have to plot a graph where im given the daily temperature for five lakes for a year (366 days). we are asked to make a graph for winter days only (days 1 to 79 and days 355 to 366) with all 5 lakes on one graph. i know that if i want to make a graph for the whole year with all the lakes on one graph i have to do:
y1= lakeerie
y2= lakehuron
y3= lakemichigan
y4= lakeontario
y5= lakesuperior
ylim([0 25])
where x represents the days and y represents the temperature in degree Celsius
but how do i only show the values for days 1 to 79 and days 355 to 366?

Sign in to comment.

Answers (2)

Kaushik Lakshminarasimhan
Kaushik Lakshminarasimhan on 30 Nov 2017
indx1 = 1:79;
indx2 = 355:366;
figure; hold on;

Image Analyst
Image Analyst on 15 Jun 2023
There are plenty of submissions in the File Exchange for plots with broken axes (skips or gaps in the axis):


Find more on App Building 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!