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
  • 2
    $\begingroup$ MultiAxisArrangement is nice in principle, but its execution is still incomplete and half-baked. For instance, it has problems with PlotRange and scaling functions, axis labeling and formatting ticks. It is unfortunate, because this is a significant drawback in MMA. Perhaps the MultipleAxesPlot resource function could help. It's rather disappointing though. $\endgroup$ Commented Jan 17, 2024 at 16:43
  • 1
    $\begingroup$ how about this approach? $\endgroup$ Commented Jan 17, 2024 at 19:46
  • 1
    $\begingroup$ try also this answer by Lukas Lang? $\endgroup$ Commented Jan 17, 2024 at 19:58
  • $\begingroup$ @kglr: Thanks for the links. They answer my question. $\endgroup$ Commented Jan 17, 2024 at 20:54

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, 2024 at 15:40

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.