Hello all,

Thanks again for all the help so far -- you guys are great! But presently I
have a (potentially silly) question. So I'm attempting to create a plot of
essentially two lists of data, but would like two x-axes: one along the top
in one length scale, another along the bottom in another length scale. I've
tried manually setting another x-axis at coordinates matching the top side
of the plot box, but that didn't work out so well:

    loglog(wavelength, flux, "ko")
    axis([1, 100, 10000, 1000000])
    a = axes([0.15, 0.95, 0.85, 0.01], frameon=False)
    a.yaxis.set_visible(False)
    a.set_xticklabels(["test1", "test2", "test3"])

(essentially I made another plot set into the larger one and moved it around
until the bottom/x-axis of that plot was along the top of the larger plot...
ugly tickmarks above the tickmark labels, though)

Then I tried the twinx() solution:

    ax1 = subplot(111)
    loglog(wavelength, flux, "ko")

    ax2 = twinx()
    ax2.xaxis.tick_top()
    ax2.set_xticklabels(["test1", "test2", "test3"])
    show()

Problem is, I change the labels of the second x-axis, it changes the labels
of the bottom one, too... I'm essentially trying to have two scales which
are functions of each other, one along the top and the other along the
bottom, but for the same dataset. I've tried scouring all sorts of
documentation and forums but haven't found quite what I'm looking for. Any
help would be much appreciated!
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to