[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Subplot excluded when there is overlap
From: |
Daniel J Sebald |
Subject: |
Subplot excluded when there is overlap |
Date: |
Sun, 12 Mar 2017 04:51:25 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
It's sometimes useful to put subplots right next to one another if they
share an axis and leave but one set of tick labels for sake of space.
There's an apparent rule that subplots which lie under a plot are not
shown. (If anyone knows of a property that changes that behavior,
please let me know.)
Because of the inexactness of floating point math, something like the
following:
figure
subplot('position', [0.15 0.2 0.8 0.2])
plot(1:50)
subplot('position', [0.15 0.4 0.8 0.2])
plot(1:50)
subplot('position', [0.15 0.6 0.8 0.2])
plot(1:50)
results in one of the subplots not displayed. Technically there is
overlap because of the floating point limited resolution, i.e., 0.2f +
0.2f > 0.4f, or 0.4f + 0.2f > 0.6f. But there is a certain
non-user-friendliness about making the user do something like
figure
subplot('position', [0.15 0.2 0.8 0.2-1e-10])
plot(1:50)
subplot('position', [0.15 0.4 0.8 0.2-1e-10])
plot(1:50)
subplot('position', [0.15 0.6 0.8 0.2-1e-10])
plot(1:50)
Also, sometimes the approach like above can result in the two borders in
common creating a thicker line.
Could the test for overlap be changed slightly to allow "nearly-equal"
in the formula somehow?
Dan
Topic: subplot plot graph position overlap disappear not shown
- Subplot excluded when there is overlap,
Daniel J Sebald <=