bugGNU Octave - Bugs: bug #30667, Plots using tex interepreter won't...

 
 

bug #30667: Plots using tex interepreter won't print to png format with gnuplot 4.2.5

Submitted by:  Rik <rik5>
Submitted on:  Fri 06 Aug 2010 02:46:56 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: RikOpen/Closed: Closed
Release: devOperating 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)

Fri 27 Aug 2010 11:01:55 AM UTC, comment #6:

I've committed the changeset that derives png output from eps.

http://hg.savannah.gnu.org/hgweb/octave/rev/dd6b90f44ae5

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Fri 20 Aug 2010 02:46:27 PM UTC, comment #5:

Rik,

After looking at the sources, I'm unable to give a warning in the proper context. Meaning that _go_draw_axes_.m does not have access to the value for the current terminal.

I've also done some more tests (which are problematic for me since my X11 is presently quirky and doesn't alway allow gnuplot to open windows). It appears that the problem does not exist for pgncairo (which is the default for gnuplot 4.4). Meaning that when I force print() to use png (not pngcairo) output I get errors like those below for both 4.2.6 and 4.4

gdImageStringFT: Could not find/open font while printing string a with font Symbol
gdImageStringFT: Could not find/open font while printing string a with font Symbol
gdImageStringFT: Could not find/open font while printing string &#xac; with font Symbol
gdImageStringFT: Could not find/open font while printing string a with font Symbol

This problem can be avoided by using gs to convert from eps to png format (as is done for the fltk backend).

I've been working on a proposed changeset that would base most output upon eps-files when the gnuplot backend is used (this already works for fltk). There are some output formats what I'd leave as they are (dxf, tikz, corel, etc). In any event, once this is done, the png problems would become moot.

Shall this ticket be reopended to avoid duplicates until I'm done and the proposal is agreed upon?

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 19 Aug 2010 02:32:51 PM UTC, comment #4:

Okay, I'll make the configure changes. The warning that you add for tex2enhanced only needs to mention the png format. The other formats like ps render just fine. I'll close this bug report now.

Rik <rik5>
Project Administrator
Thu 19 Aug 2010 11:59:49 AM UTC, comment #3:

Rik, my package manager has 4.2.6 in the stable branch and 4.4 in the unstable. So I tried 4.2.6. I see the errors below ...

enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }
enhanced text mode parser - ignoring spurious }

... and the TeX does not render.

Regarding a warning, the gnuplot backend does a lot of that now. In part, the function _gnuplot_has_feature_ was added to make that easier.

I can add a warning could to _tex2enhanced_ (in _go_draw_axes_.m), so that the first time a TeX string is created a warning is issued.

I'm unfamiliar with changes to the configure script, can you take care of those changes?

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 19 Aug 2010 04:12:33 AM UTC, comment #2:

Ben, I downloaded and compiled a local copy of gnuplot 4.4 and the plot works.

If possible, can you switch to gnuplot 4.2.5 and verify the behavior? If it is too difficult then we can skip this step. Still, it might be something that could be fixed via environment variables.

I suppose the next simple thing to do would be to add a version check on gnuplot in the configure script and warn compilers that the extended interpreter will not work if the version isn't high enough. We would also need to disable anyone compiling HTML documentation with lower gnuplot versions.

Rik <rik5>
Project Administrator
Thu 19 Aug 2010 12:19:54 AM UTC, comment #1:

Rik, your example works for me using the developer's sources and gnuplot 4.4.

Some other details; My GDFONTPATH=/Library/Fonts (which contains a lot of TrueType fonts), and my default font set to "*".

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Fri 06 Aug 2010 02:46:56 AM UTC, original submission:

Plots which make use of the extended capabilities of the tex interpreter do not print correctly to the png format. The png image has the graph but is missing text fields.

Sample warning messages are below:

setting font to ,10
gdImageStringFT: Could not find/open font while printing string &#xac; with font Symbol
gdImageStringFT: Could not find/open font while printing string &#xd6; with font Symbol
gdImageStringFT: Could not find/open font while printing string p with font Symbol
gdImageStringFT: Could not find/open font while printing string &#xf2; with font Symbol

I have extracted a plot from the octave documentation which illustrates the problem. It is attached as the file png_plot.m.

Apparently this issue has existed for quite a while as there are mentions of it here in 2009,

http://www-old.cae.wisc.edu/pipermail/bug-octave/2009-April/008362.html

and earlier in 2007,

http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2007-December/005186.html

It is only an immediate problem because the HTML documentation for Octave uses the png format. Other formats such as eps and pdf are not affected.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21155:  png_plot.m added by rik5 (247B - 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 (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Aug 2010 11:01:55 AM UTCbpabbottStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Fri 20 Aug 2010 03:49:57 PM UTCrik5StatusWont Fix=>In Progress
      Assigned toNone=>bpabbott
      Open/ClosedClosed=>Open
    Thu 19 Aug 2010 02:32:51 PM UTCrik5StatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Thu 19 Aug 2010 04:12:33 AM UTCrik5SummaryPlots using tex interepreter won\'t print to png format=>Plots using tex interepreter won't print to png format with gnuplot 4.2.5
    Thu 19 Aug 2010 12:19:54 AM UTCbpabbottOriginator Name=>Rik
    Fri 06 Aug 2010 02:46:56 AM UTCrik5Attached File-=>Added png_plot.m, #21155

    Back to the top


    Powered by Savane 3.1-cleanup1