bugGNU Octave - Bugs: bug #48200, axes labels are not visible...

 
 

bug #48200: axes labels are not visible printing a figure with gnuplot and epslatex (gnuplot)

Submitted by:  Torsten <ttl>
Submitted on:  Sat 11 Jun 2016 07:59:20 AM UTC  
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Torsten Open/Closed:  Open
Release:  dev 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)

Tue 21 Jun 2016 06:18:22 AM UTC, comment #8:

Oh, yes, well there is no background rectangle in that case. If you would like to see exactly what Octave is sending to gnuplot, try the following:

and examine the resulting 'foo.gp' file in the system directory. These two lines

are what's covering the text. You can comment out these lines and use "load 'foo.gp'" inside gnuplot.

Dan Sebald <sebald>
Tue 21 Jun 2016 05:58:56 AM UTC, comment #7:

With "directly" I mean plotting a data-set via the gnuplot command line (or a gnuplot script) after having set the terminal to epslatex.

Torsten <ttl>
Project Member
Tue 21 Jun 2016 04:57:57 AM UTC, comment #6:

As for "none" being the default, I don't know. The Octave code is doing something slightly odd in that it is changing the color to white temporarily when printing. It might be that way so bitmapped output formats that have a transparent background option (PNG? GIF?) end up by default with a white background.

Dan Sebald <sebald>
Tue 21 Jun 2016 04:54:07 AM UTC, comment #5:

I think it is a bug in gnuplot's epslatex terminal. What did you mean by "directly using gnuplot"? Using some other gnuplot terminal such as Qt? Or the epslatex terminal?

Dan Sebald <sebald>
Tue 21 Jun 2016 04:27:53 AM UTC, comment #4:

Dan, thanks for going into this. I will try the code sequence from comment #3.

Regarding comment #2, is this really a gnuplot bug? Directly using gnuplot works, i.e. the axes text is visible. Should the color be set to "none" by default?

Torsten <ttl>
Project Member
Mon 20 Jun 2016 07:27:15 PM UTC, comment #3:

Oh, you should be able to use the following to make the axis text visible:

Dan Sebald <sebald>
Mon 20 Jun 2016 07:19:19 PM UTC, comment #2:

This seems like a gnuplot bug, doesn't it? There's no way to really control what gnuplot is placing into the latex file. I'll create a gnuplot bug ticket for this.

I did uncover a couple Octave bugs though. Trying to disable all backgrounds, I did the following:

What's happening is that n is undefined because there are no large scale objects having a white background, numel(hax) equals 0:

Also, to accommodate a solution here without requiring a gnuplot upgrade, it seems logical that if the figure color is "none" there should be no background. So I made a change there as well.

See attached changeset.

(file #37532)

Dan Sebald <sebald>
Mon 20 Jun 2016 06:08:24 PM UTC, comment #1:

I know that a large rectangle was added some time ago to create a (in this case) white background so the color of the background could be changed according to the plot properties.

The way this appears to work is define gplbacktext and gplfrontttext as empty near the beginning. Then add to that text along the way. Then do the following:

So, yes, if the plot-inc (I ran this with -depslatexstandalone) has a completely opaque visual field (i.e., white rectangle at bottom) then it will completely cover the gplbacktext.

A solution that sort of works is to put the text all in gplfronttext, i.e., change from

to

This isn't quite what we want though, is it? We want something like

Dan Sebald <sebald>
Sat 11 Jun 2016 07:59:20 AM UTC, original submission:

When printing a figure with the gnuplot backend and the epslatex driver, the text in the legend is visible but not the axes labels. In the produced tex-file, the latter is processed in the macro \gplbacktext, which is displayed before the graphics. It seems to me that the graphics part from the eps-file now also has some opacity outside the diagram's box hiding the contents of \gplbacktext.

I have attached the Octave script and the tex-file for reproducing the issue.

Torsten <ttl>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37452:  main.tex added by ttl (101B - application/x-tex)
file #37451:  plotit.m added by ttl (100B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by ttl (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-22 rik5 Summaryaxes labels are not visible printing a figure with gnuplot and epslatex => axes labels are not visible printing a figure with gnuplot and epslatex (gnuplot)
    2016-06-20 sebald Attached File- => Added octave-print_figure_axis_background_bug48200-djs2016jun20.patch, #37532
    2016-06-11 ttl Attached File- => Added main.tex, #37452
    2016-06-11 ttl Attached File- => Added plotit.m, #37451

    Back to the top


    Powered by Savane 3.3