Plotting weather graphs so subsequent years are superimposed rather than sequential
    2 views (last 30 days)
  
       Show older comments
    
I have many years of weather data to plot.  At present the data is all in one long column.  But I don't want the graph to be one long graph, I want each different year of data to be superimposed on the same axis so I can make comparisons from year to year.  
Some sample data is attached.
Much appreciated.
Wendy
0 Comments
Answers (1)
  KSSV
      
      
 on 5 Feb 2019
        T = readtable('Matlab graph question.xlsx') ; 
theyears = year(T.(1)) ;
[c,ia,ib] = unique(theyears) ;
c(isnan(c)) = [] ;
% plot 2018 year data 
idx = theyears==2018 ;
plot(T.(1)(idx),T.(2)(idx))
0 Comments
See Also
Categories
				Find more on 2-D and 3-D Plots 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!
