Bug 126743 - Enable more than one y-axis
Summary: Enable more than one y-axis
Status: REPORTED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.10.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-04 16:49 UTC by Dirk Eddelbuettel
Modified: 2014-07-22 10:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Eddelbuettel 2006-05-04 16:49:56 UTC
Version:           1.2.1 (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages

Kst makes it easy to plot several 'curves' at once.  However, each additional curve is displayed on the
original scale.  While it fairly easy [ yet tedious if done often ] to scale the 'new' series by the ration of the 'new' and 'old' means [ which are available as auto-updating scalars, which is nice ],
it would be informative to also show a second y-axis on the right.  

One could even plot a third and fourth axis on the inside of the plot area, but that feature may be more controversional.  Adding a second y-axis, along with a toggle to have additional series plotted either on y-axis 1 or 2 would be welcome.
Comment 1 Dirk Eddelbuettel 2006-05-04 16:50:57 UTC
[ This is on Ubuntu 5.10 using KDE 3.4.3, but using a locally rebuilt Debian package for kst 1.2.1 ]
Comment 2 Andrew Walker 2006-05-04 17:52:22 UTC
A y-axis on the right edge of the plot is already supported.

From the plot dialog click on the "Y Axis" tab and then
check the "Transform right axis" checkbox. Finally,
enter an expression into the "Expression field" (y*2 for example)
and hit Apply.

The right axis was seen primarily as a way of converting the units
(celsius to farenheit for example) and all data is still plotted
according to the left-axis values.

Does this sound sufficient?
Comment 3 Dirk Eddelbuettel 2006-05-04 19:47:57 UTC
On 4 May 2006 at 15:52, Andrew Walker wrote:
| ------- You are receiving this mail because: -------
| You reported the bug, or are watching the reporter.
|          
| http://bugs.kde.org/show_bug.cgi?id=126743         
| 
| 
| 
| 
| ------- Additional Comments From arwalker sumusltd com  2006-05-04 17:52 -------
| A y-axis on the right edge of the plot is already supported.
| 
| >From the plot dialog click on the "Y Axis" tab and then
| check the "Transform right axis" checkbox. Finally,

Oops, I guessed I missed that.

| enter an expression into the "Expression field" (y*2 for example)
| and hit Apply.

Fun, now I get to enter the expressions twice. Not too user-friendly.
 
| The right axis was seen primarily as a way of converting the units
| (celsius to farenheit for example) and all data is still plotted
| according to the left-axis values.
| 
| Does this sound sufficient?

As a stop-gap measure, maybe. But not as a real solution. 

Kst is very featureful, and at least I consider it important to be able to
plot two (related or unrelated) series on the same chart. Is that seen as
unreasonable?

Dirk
Comment 4 Matthew Truch 2006-05-04 21:12:53 UTC
From comment #3:
As a stop-gap measure, maybe. But not as a real solution.

Kst is very featureful, and at least I consider it important to be able to
plot two (related or unrelated) series on the same chart. Is that seen as
unreasonable? 
---------------------

I agree.  I don't know how zooming would be handled (ie choosing which range to display and how to zoom only one 'set' (axis group) of data.  But it would be useful.  
Comment 5 Ted Kisner 2006-05-04 21:31:36 UTC
On Thursday 04 May 2006 12:12, Matthew Truch wrote:
| Kst is very featureful, and at least I consider it important to be able to
| plot two (related or unrelated) series on the same chart. Is that seen as
| unreasonable?
| ---------------------
| I agree. 
Comment 6 Matthew Truch 2006-05-04 21:49:24 UTC
For reference, the kind of thing that *I*'m thinking of (eventually) is like this plot from the evil plotting empire (note that I'm not the submitter of this wishlist item):
http://www.originlab.com/www/resources/graph_gallery/images_galleries/graph_multipleXYaxes_tchgrph_500px.gif

Note that for starters, having just different plot axes on either side (not necessarily multiple axes on each side) would be good.  

I think Ted's idea of having plots still be plots (single coordinate system), but a container level that can handle properly overlaying multiple plots to give the desired look/functionality.  
Comment 7 Peter Kümmel 2010-08-14 14:13:12 UTC
Could be still open in Kst 1.
Comment 8 Daniel Mader 2014-07-22 10:08:11 UTC
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()