In matplotlib, how do you display an axis on both sides of the figure?

前端 未结 3 1510
眼角桃花
眼角桃花 2020-12-16 12:32

I want to draw a plot with matplotlib with axis on both sides of the plot, similar to this plot (the color is irrelevant to this question):

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 13:01

    There are a couple of relevant examples in the online documentation:

    • Two Scales (seems to do exactly what you're asking for)
    • Dual Fahrenheit and Celsius

提交回复
热议问题