making the x-axis and y-axis fixed for all plots
10 views (last 30 days)
having the following set of plots in the attached image,and the attached file has the code I used for making the plots.
for comparison porpuses how can I fix the x-axis scale to be from [0 3*10^12] for all the plots and the y-axis to be from [100 3000]. I have tried xlim and ylim but they don't see to change anything. I have thought also of linkaxes but I am not sure how I can apply it here. if anyone has an advice?
thanks in advance.
dpb on 31 Oct 2021
If you use x/ylim before plotting and then use plot, the auto-scaling will still be in effect for the axis and plot as the high-level routine will change the limits to match the actual data.
Put the data on the axis first, then call plot. Or, use hold on first...
xlim([0 3E12]), ylim([100 300])