Both the top and bottom axes in pylab (e.g. w / different units) (or left and right)

I am trying to make a plot with pylab / matplotlib, and I have two different sets of units for the x axis. So I would like the plot to have two axes with different ticks, one on top and one on the bottom. (For example, one with miles and one with a kilometer or so).

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

Multiple axis with JpGraph

Does anyone know if this is possible with pylab?

+3
source share
1 answer

It might be a little late, but see if something like this helps:

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

+3
source

Source: https://habr.com/ru/post/1706460/


All Articles