Fri 22 Dec 2017 06:15:15 PM UTC, comment #7:
At least for FLTK, it is possible to click on a legend object and move it around. This is very useful for getting the best position. The code for this is in _init_fltk_.cc. Maybe something like it can be borrowed and put in the Qt mouse button 1 handling routine.
|
Mon 05 Dec 2016 12:38:35 PM UTC, comment #6:
figure ()
%% ST inactive:
plot (1:10)
get (gcf, 'currentobject')
%% Left Click on the axes: what happens?
get (gcf, 'currentobject') == gca
%% Righ Click on the axes: what happens?
...nothing...
get (gcf, 'currentobject') == gca
%% Check the SL and left click on the axes: what happens? Do handles appear around the axes ...?
(I suppose SelectionTool = button "Edit plot" = the white arrow button)
Clicking that shows a handle grid around the entire plot (editplot-1.png).
Clicking the axes then moves those handles to the plot lines (editplot-2.png)
%% Uncheck the ST: what happens?
The handle grid disappears.
(file #39147, file #39148)
|
Mon 28 Nov 2016 09:46:23 PM UTC, comment #5:
Pantxo,
Hopefully Thursday I'll have time to check with Matlab.
Selection works easy in Matlab (at least for legends):
simply left-click on the legend and drag it around with LMB pressed.
|
Wed 23 Nov 2016 02:52:18 PM UTC, comment #4:
@Philip: could you describe how the selection tool works in ML. I know the question is vague but having a few info would help implementing this tool in Octave.
For example does the Selection Tool (ST) have to be toggled to be able to change the current object of a figure? Test
|
Wed 26 Oct 2016 03:46:00 PM UTC, comment #3:
Here is an ugly workaround for moving legends with mouse:
|
Wed 26 Oct 2016 02:40:05 PM UTC, comment #2:
(I did search for similar reports but it didn't occur to me that "legend changes position" would be duplicates as well.)
You suggestion to change title is a good one. I'll change the status to "none' then, OK?
|
Wed 26 Oct 2016 10:37:37 AM UTC, comment #1:
Hi Philip,
The legend has "normalized" units and no listener on the figure/axes position, hence the magnification you observe when increasing the figure size. This is a known bug: see bug #39697 and bug #40333.
Now about moving the legend I think it is possible:
Can I close this report as a duplicate of cited reports, or would you prefer to keep this report and make the main issue be "graphics objects can be manipulated/dragged with the moue"?
|
Wed 26 Oct 2016 09:36:54 AM UTC, original submission:
(See attached pic for a comparison between Matlab (2014a) and Octave, both in one picture)
In Matlab, when a plot windows with a legend is resized / stretched using the mouse, the legends move with the plot area proper but aren't stretched with/like the plot area itself.
In Octave, the legend box is stretched as well, in proportion to the plot window (while the contents seem to remain untouched as regards size).
This applies to both horizontal and vertical resizing of plot windows.
In addition, in Matlab one can freely drag the legend box around in the plot window as a separate entity. In Octave the legend is fixed to its position.
In the attached pic I've dragged the legend in the Matlab subpicture from left to the right and a little below, just to show what I mean.
I suppose one of the reasons that legends in Matlab aren't stretched/resized together with plot windows is just because they seem to be independent entities.
|