bugGNU Octave - Bugs: bug #34938, Can't display text with underscore...

 
 

bug #34938: Can't display text with underscore within the property

Submitter:  None
Submitted:  Tue 29 Nov 2011 06:05:39 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  mdmitry Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 29 Aug 2013 10:48:45 PM UTC, comment #8: 

Somewhere in the last 2 years this bug has been fixed.

At least, the test code no longer produces a problem with the development branch and gnuplot 4.6.2.

Rik <rik5>
Group administrator
Thu 01 Dec 2011 06:37:26 AM UTC, comment #7: 

Rik,

I'm using gnuplot 4.4.0.
I've tried also gnuplot 4.4.3 and it does not work as well.
It may depend on operating system.

When I tried the same on CYGWIN_NT-6.1-WOW64 (under Windows 7) it worked fine with gnuplot 4.4.0.

Operating system, where I see the problem is: SLES10.3.

Regards,
   Dmitry

Dmitry Messerman <mdmitry>
Wed 30 Nov 2011 09:20:54 PM UTC, comment #6: 

What version of gnuplot are you using?  With Octave 3.2.4 and gnuplot 4.4.0 everything works correctly including the print.  With gnuplot 4.2.6 I can't print to png.

Rik <rik5>
Group administrator
Wed 30 Nov 2011 08:23:26 PM UTC, comment #5: 

Mike,

Thanks!
Good news that

+verbatim
legend('A\_B');
-verbatim

worked for me well - text displayed was 'A_B'.

However, when I've tried to print this graph using the following command:

+verbatim
print('myfile.png','-dpng');
-verbatim

I still see 'A\_B' text in the png file.

Please, let me know, if I should file separate ticket for this problem.

Thanks,
   Dmitry

Dmitry Messerman <mdmitry>
Wed 30 Nov 2011 07:16:04 PM UTC, comment #4: 

The plot command seems to be trying to work around gnuplot interpreting the underscore '_' to mean subscript. 

As a workaround for the original reporter, until something is doen in the plot function, you can use the legend() function directly.

For example, this works to produce a legend 'A_B' without subscripting.


plot (1:10);
legend ('A\_B');  # Result is 'A_B'


Rik <rik5>
Group administrator
Wed 30 Nov 2011 05:40:42 PM UTC, comment #3: 

Dmitry sent by email:

Michael,

I'm using version 3.2.4 and get the same results as you described:

1. Correct result for text function

text(1,2.5,';A_B;-*');

plots the string A_B;-*

2. Incorrect result for plot function

plot(x,x,';A_B;-*')

plots the string A\_B;-*

Regards,
   Dmitry

Michael Godfrey <godfrey>
Group Member
Wed 30 Nov 2011 04:55:48 PM UTC, comment #2: 

There does seem to be a problem here:

plot(x,x,';A\_B;-*')

plots the string A\\_B;-*

but text(1,2.5,';A\_B;-*');

plots the string A\_B;-*

This is using the current development system.

What version of Octave are you using and what
results do you get?

Michael Godfrey <godfrey>
Group Member
Wed 30 Nov 2011 05:07:11 AM UTC, comment #1: 

You need to remove the \.

Michael Godfrey <godfrey>
Group Member
Tue 29 Nov 2011 06:05:39 PM UTC, original submission:  

The following


x = 0:0.01:3;
plot(x,x,';A\_B;-*');


displays text: A\\B (B is displayed as a subscript).

Please, advise.

Thanks,
   Dmitry


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 mdmitry (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-29 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2011-11-30 rik5 CategoryPlotting Plotting with gnuplot

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code