Actually, though, I didn't want to plot 2 different sets of data as in that
example, I want 1 set of data plotted with 2 different x-axis (different units).
Any suggestion on modifying this example to accomplish this?
import numpy as np
import matplotlib.pyplot as plt
from
Neal Becker wrote:
Actually, though, I didn't want to plot 2 different sets of data as in that
example, I want 1 set of data plotted with 2 different x-axis (different
units). Any suggestion on modifying this example to accomplish this?
import numpy as np
import matplotlib.pyplot as plt
Gökhan Sever wrote:
Hi,
The code below should create a properly placed 2nd x-axis. You might need to
adjust the placement of the figure canvas to match into the window.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.parasite_axes import SubplotHost
fig
Just in case, here is a version with axes_grid1 toolkit. Note that
axes_grid is kind of deprecated.
Regards,
-JJ
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.axes_grid1 as axes_grid1
host = axes_grid1.host_subplot(111)
hplt, = host.plot(np.random.rand(100))
from
On Sun, Sep 11, 2011 at 10:16 PM, Neal Becker ndbeck...@gmail.com wrote:
Yes, that's very helpful. Just one thing. How would I get a bit more bottom
margin on the main figure to leave more room for the extra axis?
I'm using this as an example. I experimented with plt.subplots_adjust, which
Jae-Joon Lee wrote:
On Sun, Sep 11, 2011 at 10:16 PM, Neal Becker ndbeck...@gmail.com wrote:
Yes, that's very helpful. Just one thing. How would I get a bit more bottom
margin on the main figure to leave more room for the extra axis?
I'm using this as an example. I experimented with
The master is here. JJ had showed me those multi axes tricks and he is back
again with the plenty of changes to the axes_grid toolkit.
The best thing to do is to make a new clone from the master repo and
experiment.
On Sun, Sep 11, 2011 at 1:37 PM, Neal Becker ndbeck...@gmail.com wrote:
I have a semilog plot. I'd like to add a second x axis (maybe below the
existing one, or else maybe on top of graph). This second x axis is simply
describing the same existing data, in different units.
For example imagine a plot of
x - time in seconds
y - velocity
x2 - time in minutes
Neal Becker wrote:
I have a semilog plot. I'd like to add a second x axis (maybe below the
existing one, or else maybe on top of graph). This second x axis is simply
describing the same existing data, in different units.
For example imagine a plot of
x - time in seconds
y - velocity
Hi,
The code below should create a properly placed 2nd x-axis. You might need to
adjust the placement of the figure canvas to match into the window.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.parasite_axes import SubplotHost
fig = plt.figure(figsize=(10,8))
10 matches
Mail list logo