Hi,
On Thu, Jun 4, 2009 at 06:56, musik xi.xiaoxi...@gmail.com wrote:
I want to make a plot with both y axes labeled. The one on the left (y1)
will be in Fahrenheit, while the one on the right (y2) in Celsius. Is there
a way to do this?
what you're looking for is [1]
[1]
On Thu, Jun 4, 2009 at 6:01 AM, Sandro Tosi matrixh...@gmail.com wrote:
Hi,
On Thu, Jun 4, 2009 at 06:56, musik xi.xiaoxi...@gmail.com wrote:
I want to make a plot with both y axes labeled. The one on the left (y1)
will be in Fahrenheit, while the one on the right (y2) in Celsius. Is
Exactly. I want to plot the original data once, but the two y axes show
different scales (units). Is twinx() good for that? How?
Thanks.
Ryan May-3 wrote:
On Thu, Jun 4, 2009 at 6:01 AM, Sandro Tosi matrixh...@gmail.com wrote:
Hi,
On Thu, Jun 4, 2009 at 06:56, musik
On Thu, Jun 4, 2009 at 10:08 AM, musik xi.xiaoxi...@gmail.com wrote:
Exactly. I want to plot the original data once, but the two y axes show
different scales (units). Is twinx() good for that? How?
I wouldn't call it good, but you can make it work. Basically, you'd plot
your data once in F,
I hope the code below gives you some idea.
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
ax2.set_ylim(Tc(y1), Tc(y2))
# automatically update ylim of ax2 when ylim of ax1 changes.
On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:
I hope the code below gives you some idea.
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
ax2.set_ylim(Tc(y1),
This works nicely. Thank you JJ.
Jae-Joon Lee wrote:
I hope the code below gives you some idea.
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
ax2.set_ylim(Tc(y1), Tc(y2))
On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Leelee.j.j...@gmail.com wrote:
I hope the code below gives you some idea.
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
ax2.set_ylim(Tc(y1),
John Hunter wrote:
On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Leelee.j.j...@gmail.com wrote:
I hope the code below gives you some idea.
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
On Fri, Jun 5, 2009 at 11:44 AM, Andrew Strawstraw...@astraw.com wrote:
I think this would be a good direction, as well. It would also allow
disabling the tick mark labels in some axes that share the same axis --
because the ticks/labels would belong to the spine, which itself
wouldn't
John,
These ideas have been part of motivation behind my axes_grid toolkit.
In the module documentation of
lib/mpl_toolkits/axes_grid/axislines.py, I tried to briefly explain
what I wanted and what I implemented, although the explanation is very
far from complete (also some examples are found in
Jae-Joon Lee wrote:
...
def Tc(Tf): return (5./9.)*(Tf-32)
ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C
def update_ax2(ax1):
y1, y2 = ax1.get_ylim()
ax2.set_ylim(Tc(y1), Tc(y2))
# automatically update ylim of ax2 when ylim of ax1 changes.
12 matches
Mail list logo