bugGNU Octave - Bugs: bug #31176, Label subscript and superscript...

 
 

bug #31176: Label subscript and superscript positioning/resize anchor/refresh problem

Submitter:  None
Submitted:  Thu 30 Sep 2010 07:57:19 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Need Info Assigned to:  None
Originator Name:  Daniel Nezich Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 29 Aug 2013 08:06:20 PM UTC, comment #6: 

This doesn't appear to happen anymore with newer versions of Octave and gnuplot.  Closing report.

Rik <rik5>
Group administrator
Mon 29 Jul 2013 05:30:09 PM UTC, comment #5: 

I don't see this problem, but then again I don't think I was ever able to duplicate the problem in the past either.

Ben Abbott <bpabbott>
Group Member
Mon 29 Jul 2013 05:07:01 PM UTC, comment #4: 

Dormant bug report. Can OP or someone else confirm whether this bug is still present on the current development version of Octave?

Mike Miller <mtmiller>
Group Member
Thu 02 Dec 2010 04:05:54 PM UTC, comment #3: 

I uploaded a series of screen captures illustrating the problems described in the original post (except for the consequence of the 'refresh' command, which would just be a consequence of fresh layout subject to the errors described in points 1 and 2).

Rik: The code difference in point 1) is that there is a space after the subscript (ending the label text) for the second code snippet.  This renders properly on this webpage for me.

The bits of code used to produce the attached screen captures are:
0-0:

plot(1:10);


1-1:

plot(1:10);
xlabel('all text is made smaller_0');


1-2:

plot(1:10);
xlabel('all text is made smaller_0 ');


2-1:

plot(1:10);
ylabel('subscript overlaps this text_0 this too');


3-1, 3-2, and 3-3:

plot(1:10);
ylabel('subscript overlaps this text_0 this too');
xlabel('all text is made smaller_0 is made smaller');


The difference in the charts for point 3 is the manual resizing of the plot window (by clicking and dragging with the mouse).  The 'blocks' of code seem anchored at their left edge at fixed axis values, e.g. approximately x=3 for the first block of the xlabel and x=5 for the second block of the xlabel.  In contrast, with Matlab there is a single anchor for the entire label, and its value is adjusted when the window is resized, so that resizing produces a graph with optimal layout.

Ben: those commands return "*" (an asterisk) for fontname, and "12" for fontsize.


Anonymous
Mon 18 Oct 2010 11:55:58 AM UTC, comment #2: 

I tried the examples, and see no difference in the fontsize. I'm using "aqua" for the gnuplot terminal (on MacOS X). I suspect the problem is due to font management on the gnuplot end.

What does the following return ...

get (get (gca (), "xlabel"), "fontname")
get (get (gca (), "xlabel"), "fontsize")

Unfortunately, I do not know how to check what font's gnuplot is aware of.

Ben Abbott <bpabbott>
Group Member
Fri 01 Oct 2010 05:33:50 PM UTC, comment #1: 

I can't see the code difference between example 1 and example 2.  This occasionally happens because the text boxes for the bug tracker use a rich text format and will re-format the code.  Could you re-post and either attach files for the examples or use the verbatim keyword to outline your code block and prevent interpretation by the bug tracker.  See this link on verbatim (http://savannah.nongnu.org/cookbook/?func=detailitem&comingfrom=6828&item_id=125)

Rik <rik5>
Group administrator
Thu 30 Sep 2010 07:57:19 PM UTC, original submission:  

I am working with a fresh installation of Octave 3.2.4 with Gnuplot 4.4.0 downloaded from http://octave.sourceforge.net/ (MinGW binary distribution) on Windows 7 Home Premium 64.  During installation I installed with the SSE2 options and all Source Forge packages except oct2mat (following instructions to allow figures to be generated correctly).  I noticed the following unexpected results when testing some scripts developed in Matlab.  I am uncertain if these behaviours are actual bugs or 'features', but the behaviour is different from that of Matlab in identical circumstances.

1) When an axis label ends with a subscript or superscript, the entire text of the label has decreased font size.  For example, plot(1:10); xlabel('all text is made smaller_0'); produces a small text label, whereas plot(1:10); xlabel('all text is made smaller_0 '); produces properly sized text.

2) When the y axis is labeled, a subscript or superscript will overlap the text is is supposed to follow.  For example, plot(1:10); ylabel('subscript overlaps this text_0 this too'); produces properly oriented and sized text, but the portion following the subscript command ('0 this too') overlaps the beginning portion of the label text starting at 'this text'.  Note that this problem occurs with the default figure dimensions (approximately 1:2 on my screen).

3) When the figure is manually resized (by clicking and dragging on the corner of the window), both x and y labels which contain superscripts/subscripts do not move as single units, but are broken up into blocks of text of the same font size.  These blocks are anchored to the figure, not to each other, so that stretching the window causes the blocks to separate and compressing the window causes the blocks to overlap.  The figure, when refreshed by typing the command 'refresh', reverts to proper block positioning (though still subject to the deviations 1) and 2) above).

I have found no mention of this problem over hours of searching online and through the bug tracking system, and am therefore suspicious that this may be a problem particular to my setup/settings.  Any help clarifying what options may be changed or what other workarounds may exist would be greatly appreciated!

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22097:  3-1 original with labels.png added by None (19KiB - image/png)
file #22098:  3-2 resized with labels v1.png added by None (34KiB - image/png)
file #22099:  3-3 resized with labels v2.png added by None (11KiB - image/png)
file #22093:  0-0 plot only.png added by None (24KiB - image/png)
file #22096:  2-1 overlapping ylabel.png added by None (17KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-29 rik5 Open/ClosedOpen Closed
    2013-07-29 mtmiller CategoryNone Plotting with gnuplot
    2010-12-02 None Attached File- Added 3-1 original with labels.png, #22097
        Attached File- Added 3-2 resized with labels v1.png, #22098
        Attached File- Added 3-3 resized with labels v2.png, #22099
    2010-12-02 None Attached File- Added 0-0 plot only.png, #22093
        Attached File- Added 1-1 xlabel without space character after subscript.png, #22094
        Attached File- Added 1-2 xlabel with space character after subscript.png, #22095
        Attached File- Added 2-1 overlapping ylabel.png, #22096
    2010-10-01 rik5 Severity3 - Normal 2 - Minor
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code