I have 2 imported columns from excel that I plotted already, the time column ( the format HH:MM:SS) is on the x-axis and the value column is on the y-axis.
The problem that I am trying to solve since both the columns are 1645 long (or better said: they contain 1645 rows), so I want to change the x axis scale on the graph to make the distance between the times somehow longer, otherwise it looks like a long unwanted line under the x-axis.
Any Ideas how to change the x-axis scale on the graph for a better appearance?
The second hurdle that I am facing, I keep getting the error below whenever I try to plot the average line of the value column on the same graph where the time and the value column are plotted. Maybe because the x and y axis are already used?
avgline= sum(value_column)/size(value_column),1); %the value_column and time column are already defined from the workspace)
nexttileplot(time_column,value_column)hold onplot(avgline,'-r','LineWidth',2);title('Value 6')hold off%The Error that I get:
%Values plotted against x-axis must be categorical values. To create categorical values, use the categorical function.
Best Answer