bugGNU Octave - Bugs: bug #46037, bad Tex interpretation for gnuplot

 
 

bug #46037: bad Tex interpretation for gnuplot

Submitted by:  Francesco Potortì <pot>
Submitted on:  Wed 23 Sep 2015 12:51:38 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 22 Mar 2016 08:21:09 PM UTC, comment #5:

I tested the patch with gnuplot 4.6.6 and 5.0.1. I used terminals qt, wxt, and x11. It seems fine so I pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/aac8b2ca9280).

Rik <rik5>
Project Administrator
Sun 20 Mar 2016 12:29:58 AM UTC, comment #4:

I've installed gnuplot 5 and ran a few simple tests. The patch worked for me. But it could use some more testing before being committed (I worry that some gnuplot terminals may be negatively impacted)

Ben Abbott <bpabbott>
Project Member
Sat 19 Mar 2016 06:34:39 PM UTC, comment #3:

I'm attaching a trivial fix. I haven't tested on gnuplot 5, but it works for me with gnupot 4.6.6

(file #36695)

Ben Abbott <bpabbott>
Project Member
Sat 19 Mar 2016 05:44:42 PM UTC, comment #2:

@Rik,

This looks like a fairly easy thing to fix. Do you know what other gnuplot 5 syntaxes also require curly braces?

Ben Abbott <bpabbott>
Project Member
Sat 26 Sep 2015 01:36:02 AM UTC, comment #1:

I think there are several problems going on here. This is one of the reasons why Octave is slowly moving away from gnuplot.

First, a simpler example for me to use is

which produces the text

on the screen.

This is the correct syntax for versions of gnuplot < 5.0, but it seems that gnuplot also wants the whole string enclosed by curly braces.

If I use the above code then the resulting printed output has bold text. Whether the onscreen viewer will have bold text depends on the capabilities of the terminal you are using.

So, it seems that things could be improved here if you are interested. The code is contained in the m-file _gnuplot_draw_axes_.m. The function to modify is _tex2enhanced_.

I think get_fontname_and_size needs to be changed to start with the following.

That way the fnt variable will expand to the null string in _tex2enhanced_ in

But there is still the problem of wrapping everything in curly braces.

For versions of gnuplot greater than 5.0 a different syntax may be necessary according to this bug report (http://sourceforge.net/p/gnuplot/bugs/1240/).

Rik <rik5>
Project Administrator
Wed 23 Sep 2015 12:51:38 PM UTC, original submission:

$ octave --no-site-file --no-init-file --no-gui
GNU Octave, version 4.0.0
...

>> graphics_toolkit gnuplot
>> plot(1:2)
>> text(1.5, 1.5, "\\bfccc")


The text on the plot is "/-boldccc"

Francesco Potortì <pot>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36695:  changeset.patch added by bpabbott (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pot (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Mar 2016 08:21:09 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 19 Mar 2016 06:34:39 PM UTCbpabbottAttached File-=>Added changeset.patch, #36695
    Sat 26 Sep 2015 01:36:02 AM UTCrik5CategoryPlotting=>Plotting with gnuplot
      StatusNone=>Confirmed
      Summarybad Latex interpretation=>bad Tex interpretation for gnuplot

    Back to the top


    Powered by Savane 3.1-cleanup1