bugGNU Octave - Bugs: bug #56289, print to eps - clip option

 
 

bug #56289: print to eps - clip option

Submitter:  Leonardo <pocker>
Submitted:  Wed 08 May 2019 02:06:52 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 5.1.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 May 2019 07:09:26 PM UTC, comment #1: 

The -tight option doesn't work great, it is known to corrupt figures in some cases (see e.g. bug #55723). A possible workaround, is to change the axes "looseinset" property so that it takes as much space in the figure as possible:


plot (1:10);
xlabel ("XLabel")
ylabel ("YLabel")

li = get (gca, "looseinset")

## margins are necessary due to bug #53235
m = 0.01;
set (gca, "looseinset", [m m m m])
print toto.eps
set (gca, "looseinset", li)


Pantxo Diribarne <pantxo>
Group Member
Wed 08 May 2019 02:06:52 PM UTC, original submission:  

Hi,

when printing a plot to eps using the option -tight, the generated eps file has indeed the BoundingBox values (BB for short).

Opening the eps file with any viewer will show the correct image (respecting the BB)

When inserting the eps file into latex, however, the BB will be respected only if I use the "clip" option, i.e.,

\includegraphics[scale=0.7,clip]{figure.eps}

and if I remove the "clip" option, the BB value, for some reason, is partially ignored. See pdf attached.

Nevertheless, if I use matlab to generate the same figure, there is no need to use the "clip" option.

It seems like the eps generated by matlab has some sort of "clip enable" in the eps sourcecode.

If this is the case, is it possible to enable clip by default?

P.S. I use "latex" command to generate the .dvi and dvipdf to convert to .pdf. If I use "pdflatex", there is no problem since the eps is converted to pdf first.

Leonardo <pocker>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46884:  example.pdf added by pocker (21KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by pocker (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-08 pantxo CategoryNone Plotting with OpenGL
        Item GroupMatlab Compatibility Inaccurate Result
        StatusNone Confirmed
    2019-05-08 pocker Attached File- Added example.pdf, #46884

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code