0

In a plot such as the following I want to switch from a logarithmic to a linear scale (e.g. starting from the blue lines at 6 * 10^5) on both axes.

I know how to do this for just one of them from this thread. But how to do this for both at the same time?

example

Gerhood
  • 61
  • 3
  • https://matplotlib.org/3.2.1/gallery/subplots_axes_and_figures/two_scales.html OR https://matplotlib.org/3.1.0/gallery/subplots_axes_and_figures/secondary_axis.html – Shijith Sep 24 '20 at 09:14
  • Does this answer your question? [combining a log and linear scale in matplotlib](https://stackoverflow.com/questions/21746491/combining-a-log-and-linear-scale-in-matplotlib) – Enis Arik Sep 24 '20 at 09:16
  • You just need to implement the same solution for both axes. – Enis Arik Sep 24 '20 at 09:16
  • 1
    @earik87 No, in fact I mentioned this very thread myself. To my understanding with append_axes we just put multiple sets of axes next to each other. That alone does not suffice here. – Gerhood Sep 24 '20 at 09:25
  • With a single axis switching form linear to log, you need to do the graph in two parts, as the linked example shows. Think of this as two separate rectangular parts of the graph, one for linear and one for log. With both axes, you now have four separate rectangular parts of the graph (exactly the four sections delineated by your blue lines above), that is, (linear, linear), (linear, log), (log, linear), and (log, log). That is, whereas the link answer has two parts, you need four, but otherwise it's exactly the same. – tom10 Sep 25 '20 at 03:27

0 Answers0