bugGNU Octave - Bugs: bug #46651, title in surfl mis-positioned in...

 
 

bug #46651: title in surfl mis-positioned in subplot with gnuplot

Submitted by:  Ceral Paquet <octavebugs>
Submitted on:  Thu 10 Dec 2015 12:31:37 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 24 Nov 2016 12:04:20 AM UTC, comment #10:

This appears to work for me with Octave 4.2 and gnuplot 5. The bug status had already been set to Fixed but was left open. I'm not following the copious notes after when it was remarked that this was already fixed (comment #4), but closing as fixed anyway. If there are other problems with text placement a separate bug can be reported to keep track of that.

Mike Miller <mtmiller>
Project Administrator
Sun 24 Jul 2016 07:47:18 PM UTC, comment #9:

Yes. Seeing that makes me remember a little more. The related comment is here:

https://savannah.gnu.org/bugs/?47974#comment55

The reason for the emergence of bad title placement has to do with a change in gnuplot, one that I don't think I totally agreed with. The issue was something like gnuplot developers change the sizing so that the plot decreases the amount of wasted white space, but the title was still placed the same so it lands on the plot.

On the gnuplot bug-list I suggested two modes: One the gnuplot currently behaves, keeping the 3D plot the same scale, and another in which the scaling of the 3d plot changes with rotation to minimize white space (which is the way that rotation works in qt/fltk toolkits). Didn't get much traction.

It appears that gnuplot can accept x/y/z coordinates for label placement. So, the x- and y-axis labels should be controlable. In fact, looking at how Qt toolkit handles the title when changing the various units, it would seem that more of the options for title placement should work and that "reinterpretation" of normalized might not have been necessary. The one problem with gnuplot is that one can't get the current data coordinates of the title if, for example, one changes from 'normalized' (title stays stationary unaffected by rotation angle) to 'data' (title location changes with rotation). But that's not too bad of a problem.

I can't look at this right now, but maybe in a week or so.

Dan Sebald <sebald>
Sun 24 Jul 2016 06:53:19 PM UTC, comment #8:

Looks like this is the part from the changeset you referenced that impacts the position of the title string.

Ben Abbott <bpabbott>
Project Member
Sun 24 Jul 2016 06:18:00 PM UTC, comment #7:

I searched my local directory where I keep a record of patches and such. It doesn't look like I did anything for axis annotation:

I probably thought to do so but then got busy with something else. I looks like I created a do_text() routine that could be reused so maybe the x/y label might be easy to alter.

Dan Sebald <sebald>
Sun 24 Jul 2016 06:00:12 PM UTC, comment #6:

Dan, you used the "position" information for the title's text object? Did you do the same for the xlabel and ylabel?

Ben Abbott <bpabbott>
Project Member
Sun 24 Jul 2016 05:57:07 PM UTC, comment #5:

Yes, I recall addressing title placement. I think instead of gnuplot's default title positioning, I used a label definition given that the location is available to the toolkit. So, some of the properties for the title placement may now inherently work.

Dan Sebald <sebald>
Sun 24 Jul 2016 05:42:23 PM UTC, comment #4:

I can confirm that the stable has the problem and the default branch does not. I'm running 5.0 patch level 3.

I assume that one of Dan's recent patches fixed this?

Ben Abbott <bpabbott>
Project Member
Sun 24 Jul 2016 02:37:41 PM UTC, comment #3:

This bug seems to be fixed in dev branch (at least in Windows version).
Can someone else confirm this?

Avinoam Kalma <avinoam>
Project Member
Wed 16 Dec 2015 01:01:17 PM UTC, comment #2:

The position of the titles, and axis labels are determined by gnuplot and can very for each of gnuplot terminals.

The only practical solution is to allow the user to make adjustments to the position of the title/axis-labels (gnuplot has a feature which supports this). But I'm not sure how to setup the interface.

Perhaps extra properties can be added to axes drawn using gnuplot. Something like "titleoffset", "xlabeoffset", "ylabeloffset", and "zlabeloffset"?

If someone would like to work on a changeset, I can provide more details on how this might be done.

Ben Abbott <bpabbott>
Project Member
Thu 10 Dec 2015 04:26:59 PM UTC, comment #1:

Confirmed with gnuplot. Using qt or fltk shows the title correctly above the figure.

Mike Miller <mtmiller>
Project Administrator
Thu 10 Dec 2015 12:31:37 PM UTC, original submission:

figure
subplot(1,2,1)
surfl(rand(5));
title(sprintf('x=%.2f y=%.2f z=%.2f',1,2,3))

Using the code above, the title appears overlaid on the figure. Without subplot, it works fine. I'm on gnuplot. I haven't chekced any other graphics backend.

octave:67> graphics_toolkit ()
ans = gnuplot

Ceral Paquet <octavebugs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by bpabbott
  • -unavailable- added by avinoam (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by octavebugs (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Nov 2016 12:04:20 AM UTCmtmillerOpen/ClosedOpen=>Closed
    Sun 24 Jul 2016 05:42:24 PM UTCbpabbottCarbon-Copy-=>Added -unavailable-
    Sun 24 Jul 2016 05:42:23 PM UTCbpabbottStatusConfirmed=>Fixed
      Operating SystemGNU/Linux=>Any
    Thu 10 Dec 2015 04:26:59 PM UTCmtmillerCategoryNone=>Plotting with gnuplot
      Item GroupNone=>Incorrect Result
      StatusNone=>Confirmed
      Release4.0.0=>dev
      Summarytitle in surfl mis-positioned in subplot=>title in surfl mis-positioned in subplot with gnuplot

    Back to the top


    Powered by Savane 3.1-cleanup1