I want to combine two ListLogPlot
plots. For example
p1 = ListLogPlot[Range@100, Frame -> True]
p2 = ListLogPlot[10^4*Range@100, Frame -> True]
I got
Show[p1, p2, PlotRange -> All]
By using the ticks of p2, I got
Show[p1, p2, PlotRange -> All, FrameTicks -> (FrameTicks /. p2[[2]])]
Both of the results have ticks which only cover a part of the figure.
By trying
Show[p1, p2, PlotRange -> All, FrameTicks -> Automatic]
I actually got a wrong result with completely wrong ticks.
So would there be a way to let Show
combine the plots and redraw the ticks automatically? Thanks!
Some notes:
(1) There is a similar post:
Scale label problem of multiple ListLogPlot graphs
However, it doesn't solve my problem because the two plots here have different scales which are non-overlapping. Thus the problem is not solved simply by ordering the plots or choosing which ticks to use.
(2) I could instead do ListLogPlot[{Range@100, 10^4*Range@100}]
. However, actually each plot command in my realistic case is complicated enough thus it would be easier and more modular for me to draw them separately and combine them afterwards.
Show
and fake the frame ticks. So, usep1 = ListLogPlot[Range@100, Frame -> True, PlotRange -> {All, {1, 10^6}}]
and the rest of your code the same. $\endgroup$p3
in the 10^12 range. Now if you add, PlotRange -> {All, {1, 10^14}}
top1
and use `Show[{p1,p2,p3}, PlotRange -> All] it should look OK. $\endgroup$