Bug 300014 - Plot dimensions automatically reset after reload session when plot is in shared axis
Summary: Plot dimensions automatically reset after reload session when plot is in shar...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: view objects (show other bugs)
Version: 2.0.4
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 15:54 UTC by david.mcminn
Modified: 2012-06-12 21:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example data for reproducing bug (93 bytes, application/vnd.ms-excel)
2012-05-14 15:54 UTC, david.mcminn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description david.mcminn 2012-05-14 15:54:23 UTC
Created attachment 71091 [details]
Example data for reproducing bug

If you create some plots on the same tab (1 plot horizontally * 2 or more plots vertically) with a shared X axis (Y axis is not shared) and then configure the dimensions so that the plots are not an equal proportion of the vertical screen resolution, save the session, close KST, load the same session then the plot dimensions have been reset. I would expect them to stay as they had been configured.

Steps to reproduce (using attached example data file):
1) Start kst, begin new session
2) Use data wizard to import the 3 columns from data.csv and create 3 plots in the same tab, one for each column of data.
3) Create a shared axis box covering the three plots
4) RMB on shared axis box and make sure plots are not sharing Y axis
5) Edit dimensions of top plot so y=0.1 and height=0.2
6) Edit dimensions of middle plot so y=0.5 and height=0.6
7) Edit dimensions of bottom plot so y=0.9 and height=0.2
8) Save session
9) Close kst
10) Open kst
11) Load session

The dimensions of the plots seem to have reverted to automatic. Even using "protect layout" does not protect the layout.
Comment 1 Netterfield 2012-05-25 18:54:10 UTC
Wow... I hadn't even realized it was possible to do this and had forgotten that the position/size box wasn't disabled for shared axis boxes - I had meant to disable it.  I'm amazed it works at all (though I would call the current behavior 'clunky at best')

But what to do about it now that you have discovered this secret feature?

i) disable position/size for plots in a shared axis box, as I had intended.
ii) try to make manual adjustment of relative sizes in shared axis boxes work correctly - this requires making sure that they always stay touching - shrinking one should grow its neighbors properly.  It should be adjustable with the mouse.  And loading/saving needs to work.  Make sure there is sensible behavior when the box itself is resized.  Make sure that auto-formatting works.  Make sure you can revert to default sizes.  This would be a fair bit of work.

Hmmm...
Comment 2 david.mcminn 2012-06-01 08:06:59 UTC
Well, given the option I'd say (ii), not because it's more work but because you don't always need plots to have the same heights so simply disabling the position/size fields would make the functionality worse.

As an initial step keeping the position/size fields enabled and making sure the load/save works would be a good first step. It improves the functionality and at least works towards a full implementation of all the features of (ii). Performing an automatic layout currently has the effect of reverting to default sizes AFAICS so that is also covered.
Comment 3 Netterfield 2012-06-01 15:32:56 UTC
The current way of handling arbitrarily sized plots with 'shared' axis is to to select "Hide Margins and Labels" as appropriate in the plot dialog, ?-Axis tabs, and then size everything by hand.  This currently ~works.

This allows all sorts of sizing, including shifting things.  It is how it worked in kst1.x.
Can you look at this technique, and let me know if it does what you want.

The new 'shared axis box' capability in 2.x is a fully automated thing that is supposed to size automatically, and never get out of sync.
Comment 4 david.mcminn 2012-06-09 21:30:30 UTC
I have checked the current technique and I can get it to work for my needs. I had (or I had thought) I tried that before finding the shared axis and could not get it to work. Perhaps I done something incorrectly previously, but I can get it to work now.
Comment 5 Nicolas Brisset 2012-06-11 19:44:53 UTC
So, what should we do about this report? Close it or keep it around in case we (barth) get bored one of these days?
Comment 6 Netterfield 2012-06-12 21:28:10 UTC
SVN commit 1300157 by netterfield:

Don't allow plots in a shared axis box to be resized.


 M  +5 -0      plotitemdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1300157