Sorry for (week-end) delay. Here is more or less what I did (I don’t include all the code, just the essential parts).
Here is what I did
Note: at the outset, I have already defined 3 functions:
uₒ_ which depend on temperature in a temperature span
T_span.-273.15, [uₒ.(T_span), uₒ_c.(T_span),uₒ_.(T_span)], ...
Some “recent frustrations” and (unrealistic?) suggestions…
Things in documentation that confused me
- At first, I didn’t know where to find the information in the documentation for Plots.jl.
If I search
Plots.jl and open the
page, attempt to find the
inset information by:
inset in the search box – now luck
Ctrl+f in the browser, and searched for
inset. Again, now luck, because the browser search function only search in the active window, i.e., in the
Tutorial up until (but not including)
your suggstion of
inset_subplots helped somewhat, but what really helped is the link to
Layouts . Plots.
inset_subplots does not occur in the
plot command… it is possible that
inset_subplots really means "the range of commands from
subplot?? That is, however, not obvious to me.
NOTE: this problem I have with search is not unique for
- Somewhat confusing argument list?
# The call is `bbox(x, y, width, height, origin...)`, where numbers are treated as
# "percent of parent"
This is somewhat confusing… the numbers (
height) are not “percent of parent” (a number from 0-100), but fraction of parent (range: 0-1).
So my understanding of these numbers are:
y gives the coordinates of the inset relative to the upper left corner of the parent figure, which is position (0,0), with coordinate axes going downwards (
x) and to the right (
y), and where the lower right corner of the parent plot is in position (1,1).
height specify the width and height of the inset in fraction of the parent plot window.
Is it somewhat confusing the the first coordinate of
y relates to the vertical position, while the first of
height relates to horizontal size? More logical with
origin argument is not really explained. But from examples, I assume that it is possible with two arguments, and that the purpose is to define how the inset is positioned relative to the inset origin specified by
y. Where the default is that the inset origin is the upper left corner of the inset, so possible
origin commands are
:right, and similar.
- What does the
subplot command do? Do I have to set the
subplot = 2 if I have a single parent plot, i.e., without subplots?
Could the inset work in a simpler way?
plot command may get somewhat convoluted for complex plots with insets.
Would it be possible to do my plot above in the following way?
fig_parent = plot!(T_span.-273.15,uₒ_.(T_span),...)
fig_sub = plot(T_span.-273.15, [uₒ.(T_span), uₒ_c.(T_span),uₒ_.(T_span)], ...
That way, the plot command holding the
inset command itself becomes relatively simple, while it is still possible to created complex plots for the parent plot and the inset.
OK – I have no idea whether this is possible from the architecture of