bugGNU Octave - Bugs: bug #33155, text function fails to display...

 
 

bug #33155: text function fails to display degree symbol

Submitter:  None
Submitted:  Mon 25 Apr 2011 06:30:23 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 27 Mar 2014 06:03:35 AM UTC, comment #7: 

Using the qt or wxt terminals of gnuplot 4.6.5, this works perfectly. It's only the x11 terminal that displays the extra  character.

Based on that, Octave is able to send a sequence of UTF-8 bytes to gnuplot and have it be interpreted correctly. It seems to only depend on the gnuplot terminal type and that's pretty much out of Octave's control.

I say mark this as fixed.

Mike Miller <mtmiller>
Group Member
Fri 03 Jan 2014 04:42:56 PM UTC, comment #6: 

The real problem now is UTF-8 characters on the command line.  We could file a bug report about that and mark it postponed since that is going to be quite a project to work out.

Rik <rik5>
Group administrator
Fri 03 Jan 2014 04:07:20 PM UTC, comment #5: 

Ping?

The original example seems to work properly for me now with opengl+fltk but not with gnuplot.  With gnuplot, the degree symbol is shown on the screen, but so is an extra glyph (A with a caret over it).

John W. Eaton <jwe>
Group administrator
Thu 29 Aug 2013 03:29:55 AM UTC, comment #4: 

This report and #39828 are discussing closely related
topics.

Would it make sense to continue the gnuplot issues
here, and fltk issues on #39828?

Sorry for any confusion.

Michael Godfrey <godfrey>
Group Member
Thu 29 Aug 2013 12:28:05 AM UTC, comment #3: 

The FLTK toolkit has been modified on the development branch to support both 'char(176)' or the TeX sequence '\circ' for producing a degree symbol

Can I say one more time what a bad idea this is:

1. If you look in the TeX Manual '\circ' is described
   as one of the math binary operators. degree is NOT.

2. Now, there is no way to produce the '\circ' which anyone
   familiar with TeX would expect.

3. In the unicode Table '\circ' is also in the Math Symbols.

4. The fact that '\circ' in Matlab produces the degree symbol
   is widely viewed as an error.

People who have been using '\circ' in Matlab to get the degree
symbol (certainly not as a binary operator) will either not
notice that in Octave they get '\circ' or be pleasantly
surprised.

Michael Godfrey <godfrey>
Group Member
Wed 28 Aug 2013 06:25:14 PM UTC, comment #2: 

The FLTK toolkit has been modified on the development branch to support both 'char(176)' or the TeX sequence '\circ' for producing a degree symbol

Rik <rik5>
Group administrator
Sun 15 May 2011 01:51:59 AM UTC, comment #1: 

Confirmed on a recent development branch tip (2011/05/14).  This is annoying, but probably won't get fixed immediately.  My guess is that it is an interaction between how your command window is encoding characters (maybe UTF-8) and how Octave expects them.

For a temporary workaround, try constructing strings using the hex or decimal value of the special character you are trying to use.  For example, the degree symbol has a decimal value of 176 so the following works:


graphics_toolkit gnuplot
plot (1:10);
str = ["100", char(176), " Celcius is 212", char(176), " Fahrenheit"];
ht = text (2,6,str);


This will only work with gnuplot.  The FLTK toolkit won't work even with this approach.

Rik <rik5>
Group administrator
Mon 25 Apr 2011 06:30:23 AM UTC, original submission:  

The following code demonstrates the problem:

x=1:10;y=x.^2;plot(x,y);
text(x(3),y(3),'  test symbol ° text')


Under fltk, a warning is displayed (4 times) on the terminal:

warning: ft_render: skipping missing glyph for character `�'


Nothing is rendered on the plot.

Under gnuplot, 2 characters are rendered (not the desired one) and the same warnings are displayed on the terminal.

Have tried setting different default fonts, no change in warnings or outputs.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 jwe (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-27 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-01-03 rik5 CategoryPlotting Plotting with gnuplot
    2011-05-15 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code