pylab 中的顶部和底部轴(例如,具有不同的单位)(或左右) [英] both a top and a bottom axis in pylab (e.g. w/ different units) (or left and right)

查看:30
本文介绍了pylab 中的顶部和底部轴(例如,具有不同的单位)(或左右)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用pylab/matplotlib进行绘制,并且x轴有两组不同的单位.因此,我希望该图具有两个带有不同刻度的轴,一个在顶部,一个在底部.(例如,一个有英里,一个有公里左右.)

I'm trying to make a plot with pylab/matplotlib, and I have two different sets of units for the x axis. So what I would like the plot to have is two axis with different ticks, one on the top and one on the bottom. (E.g. one with miles and one with km or so.)

类似于下图(但我想要多个 X 轴,但这并不重要.)

Something like the graph below (but than I would like multiple X axes, but that doesn't really matter.)

有人知道这是否可以用 pylab 实现吗?

Anyone an idea whether this is possible with pylab?

推荐答案

这可能会有点晚了,但是看看是否有这样的帮助:

This might be a little late but see if something like this would help:

http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline4.html

这篇关于pylab 中的顶部和底部轴(例如,具有不同的单位)(或左右)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆