Python/Matplotlib - Is there a way to make a discontinuous axis?

后端 未结 5 678
春和景丽
春和景丽 2020-11-22 07:46

I\'m trying to create a plot using pyplot that has a discontinuous x-axis. The usual way this is drawn is that the axis will have something like this:

(values)----/

5条回答
  •  不要未来只要你来
    2020-11-22 08:10

    For those interested, I've expanded upon @Paul's answer and added it to the ProPlot matplotlib package. It can do axis "jumps", "speedups", and "slowdowns".

    There is no way currently to add "crosses" that indicate the discrete jump like in Joe's answer, but I plan to add this in the future. I also plan to add a default "tick locator" that sets sensible default tick locations depending on the CutoffScale arguments.

提交回复
热议问题