1
$\begingroup$
Labeled[
 ListLinePlot[
  {Range[10], Prime[Range[10]], Range[10]^2}, 
  MultiaxisArrangement -> {Right -> {1, 2}, Left -> 3},
  PlotRange -> All,
  PlotMarkers -> {Automatic, Small},
  ImagePadding -> "Quality",
  Joined -> True,
  ImageSize -> Large,
  AxesOrigin -> {1}
  ], {"Cascading steps", "Number of sectors", 
  "Shock propagation trajectory", "Recovery process", 
  "Risk of economic loss"}, All, RotateLabel -> True]

produces:

enter image description here

These answers are addressing the same issue but the one I have is missing.

In the above figure, the Blue axis name "Risk of economic loss" on the right-hand side is missing. Also, the origin of the axis should start from 1 to avoid the empty space on the figure. I tried AxisOrigin->{1} but it does not work. The fonts used in the entire figure should be the same. Last, the colors of the axes are not really visible.

$\endgroup$
4

1 Answer 1

2
$\begingroup$

For purposes of completeness, I post this answer (due to kglr and Lukas Lang):

data1 = Range\[10\];
data2 = Prime\[Range\[10\]\];
data3 = Range\[10\]^2;

ResourceFunction\["CombinePlots"\]\[
 ListLogLinearPlot\[
  data1,
  PlotRange -> {0, 30},
  Frame -> True,
  ImageSize -> 450,
  FrameLabel -> {"Cascading steps", "Number of sectors"},
  FrameStyle -> Blue,
  LabelStyle -> {Black, FontSize -> 12},
  PlotStyle -> Blue,
  Joined -> True,
  PlotMarkers -> {Automatic, Scaled\[0.03\]}
  \],
 ListLogLinearPlot\[
  data2,
  PlotRange -> {0, 300},
  Frame -> True,
  FrameLabel -> {"Cascading steps", "Recovery process"},
  PlotMarkers -> {Automatic, Scaled\[0.03\]},
  FrameStyle -> Darker@Green,
  PlotStyle -> Darker@Green,
  Joined -> True,
  PlotMarkers -> {Automatic, Scaled\[0.03\]}
  \],
 ListLogLinearPlot\[
  data3,
  PlotRange -> {-200, 200},
  Frame -> True,
  FrameLabel -> {"Cascading steps", "Risk of economic loss"},
  PlotMarkers -> {Automatic, Scaled\[0.03\]},
  FrameStyle -> Orange,
  PlotStyle -> Orange,
  Joined -> True,
  PlotMarkers -> {Automatic, Scaled\[0.03\]}\],
 "AxesSides" -> {Left, Right, Right -> 2}
 \]]

enter image description here

$\endgroup$
1
  • $\begingroup$ Although the code I gave above satisfies my need, I am not really happy about the code itself because there are many repetitions that make the code much longer than what MultiaxisArrangement promises to provide. MultiaxisArrangement is attractive because its is very short and flexible. $\endgroup$ Commented Jan 19 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.