Hi everyone,
I am plotting a figure where I need two independent x axes and two
independent y axes. I've tried to use both twinx and twiny at the
same time, and this works to some extent, but it looks like it is
plotting the labels for the bottom x axis and the right-hand y axis
twice, which makes me think that I must be doing something wrong (the
numbers appear more 'bold'). The code is below. Is there a better way
to do this?
In reality, I don't need a different scale for the opposite axes, but
I want to specify different Locator functions, but I assume that
creating a new axes instance as done below is the only way to do this?
Thanks for any advice,
Thomas
###
fig = figure()
ax = fig.add_subplot(111)
ax2 = ax.twinx().twiny()
for tick in ax.yaxis.get_major_ticks():
tick.label1On = True
tick.label2On = False
tick.tick1On = True
tick.tick2On = False
for tick in ax.xaxis.get_major_ticks():
tick.label1On = True
tick.label2On = False
tick.tick1On = True
tick.tick2On = False
for tick in ax2.yaxis.get_major_ticks():
tick.label1On = False
tick.label2On = True
tick.tick1On = False
tick.tick2On = True
for tick in ax2.xaxis.get_major_ticks():
tick.label1On = False
tick.label2On = True
tick.tick1On = False
tick.tick2On = True
ax.scatter([0.4],[0.6])
ax2.scatter([10.],[10.])
draw()
###
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users