subplot log-scale set range
11 views (last 30 days)
I have a plot that looks compressed because one or some of the plots are too far away.
I want to compress it so it look nicer. I use set(gca, 'YScale', 'log'); on all the subplot initialization but the result still look ugly.
How do I
1. Do a proper log plot ?
2. Smartly compress the axis range (first figure) so the plot take up the entire graph ?
dpb on 10 Aug 2017
You can still use non-decade values for ylim even on log axes, by default the logic for data that spans a couple of decades will be as you see to use even decade values. ylim([0.05 1]) or in that neighborhood might help on the left one but the linear axes look "better" to me than the log for all three, personally.
What would help more than either log or y-axes scaling on these in my opinion would be to expand the x-axes scale some -- start with xlim([0 700]) or xlim([100 700]) and adjust from there...
John BG on 10 Aug 2017
Edited: John BG on 10 Aug 2017
this is John BG <mailto:firstname.lastname@example.org email@example.com>
compress the data on Y axis by increasing the Y span of axis handle
Let's say you have the following points, just test points randomly generated earlier on
x =[7 9 -8 9 3 -8 -5 1 10 10 -7 10]
y =[10 0 6 -8 -2 9 6 10 3 -10 7 9]
capture the axis handle
Axes with properties:
XLim: [-8 10]
YLim: [-10 10]
Position: [0.1300 0.1100 0.7750 0.8150]
increase Y axis span
Increase the lower limit of the Y axis until all the curves are close enough for presentation.
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance