[Kst] [kst] [Bug 126743] Enable more than one y-axis

Daniel Mader danielstefanmader at googlemail.com
Tue Jul 22 10:08:11 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=126743

Daniel Mader <danielstefanmader at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danielstefanmader at googlemai
                   |                            |l.com

--- Comment #8 from Daniel Mader <danielstefanmader at googlemail.com> ---
Hello,

I'd also very much vote for such a feature. In Python's matplotlib, this would
be done like this:

import matplotlib.pyplot as plt
fig = plt.figure(figsize=(16,10))
ax1 = fig.add_subplot(111)
ax2 = ax1.twinx()
xs = range(1,21,1)
ys1 = [x**2 for x in xs]
ys2 = [1./x for x in xs]
ax1.plot(xs, ys1, 'ro-', label='1st')
ax2.plot(xs, ys2, 'gs--', label='2nd')
ax1.grid()
fig.suptitle('fig title', fontsize=18)
ax1.set_title('ax title')
ax1.set_xlabel('xlabel')
ax1.set_ylabel('ylabel1')
ax2.set_ylabel('ylabel2')
#ax1.set_xlim(left=None, right=None)
#ax1.set_ylim(bottom=None, top=None)
ax1.legend(loc='best', numpoints=1)
ax2.legend(loc='best', numpoints=1)
fig.show()

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kst mailing list