What is the best way to include the 2 axis plot in Scidraw? I need it as one of a bunch of multipanel figures and when I include it with FigGraphics
the second Y axis is lost. I can manually use TickLabelFunction
to restore the correct ticks, but this is very tedious.
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
I actually managed to answer this one while writing the question, and thought I would share the answer. Scidraw makes it super easy to do 2 axis plots!
a = Plot[1000*x, {x, 0, 1}, PlotStyle -> Blue];
b = Plot[x^2, {x, 0, 1}, PlotStyle -> Red];
Figure[Multipanel[{FigurePanel[{
FigGraphics@a;
}, {1, 1}, XPlotRange -> {0, 1}, YPlotRange -> {0, 1000},
ShowTickLabels -> {{False, True}, {True, False}},
YTickTextColor -> Blue],
FigurePanel[{
FigGraphics@b;
}, {1, 1}, XPlotRange -> {0, 1}, YPlotRange -> {0, 1},
ShowTickLabels -> {{True, False}, {False, False}},
YTickTextColor -> Red
]}, Dimensions -> {1, 1}, XPanelGaps -> 0.2, YPanelGaps -> 0.2,
ShowFrameLabel -> True,(*by default we want all frame labels,
not just on the edges*)
ShowTickLabels -> True], CanvasSize -> {8, 6}]
```