% File: multicolPlot % % MATLAB script to demonstrate the use of readColData.m for reading % column data with text headings. Read the data in plot it using % a legend derived from the labels in the data file % read labels and x-y data [labels,month,t] = readColData('PDXtemperature.dat',4,5); plot(month,t(:,1),'ro',month,t(:,2),'c+',month,t(:,3),'g-'); xlabel(labels(1,:)); % add axis labels and plot title ylabel('temperature (degrees F)'); title('Monthly average temperature for Portland International Airport'); % legend(labels(2,:),labels(3,:),labels(4,:));