如何在图的两侧显示轴

如何在图的两侧显示轴

本文介绍了在matplotlib中,如何在图的两侧显示轴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想用matplotlib在图的两边绘制一个带有轴的图,与此图相似(颜色与此问题无关): 我如何用 matplotlib ? 注意:与示例图中显示的相反,我希望两个轴完全相同,并且只想显示一张图。在线文档中有几个相关的示例: 解决方案 两个缩放(看起来完全符合你的要求) 双华氏度和摄氏温度 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):How can I do this with matplotlib?Note: contrary to what is shown in the example graph, I want the two axis to be exactly the same, and want to show only one graph. Adding the two axis is only to make reading the graph easier. 解决方案 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 这篇关于在matplotlib中,如何在图的两侧显示轴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 01:42