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

 
 

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

Submitted by:  None
Submitted on:  Tue 29 Nov 2011 06:05:39 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: mdmitryOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: GNU/Linux

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 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>
Project 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>
Project 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.

Rik <rik5>
Project 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>
Project 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>
Project Member
Wed 30 Nov 2011 05:07:11 AM UTC, comment #1:

You need to remove the \.

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

The following

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 29 Aug 2013 10:48:45 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 30 Nov 2011 07:16:04 PM UTCrik5CategoryPlotting=>Plotting with gnuplot

    Back to the top


    Powered by Savane 3.1-cleanup1