bugGNU Octave - Bugs: bug #57143, print ('-tight', 'q.eps') produces...

 
 

bug #57143: print ('-tight', 'q.eps') produces no file

Submitted by:  None
Submitted on:  Wed 30 Oct 2019 03:10:16 PM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.1.0
Operating System:  Any

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)

Thu 31 Oct 2019 12:34:08 PM UTC, comment #6: 

I've noticed several epstool errors with latex, and something else I believe, however, there was no package in the repo, so I gave up using eps on my void machine.

Anyways; on w10 I get the following

octave:2> plot (1:10)
octave:3> print -tight -debug tight.eps
epstool command: 'C:\Octave\OCTAVE~1.0\mingw64\bin\gs.exe -dQUIET -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVICE=eps2write -sOutputFile="C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps" - C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps & C:\Octave\OCTAVE~1.0\mingw64\bin\epstool.exe --quiet --copy --bbox C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps 'tight.eps'  & del C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps '
opengl-pipeline: 'C:\Octave\OCTAVE~1.0\mingw64\bin\gs.exe -dQUIET -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVICE=eps2write -sOutputFile="C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps" - C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps & C:\Octave\OCTAVE~1.0\mingw64\bin\epstool.exe --quiet --copy --bbox C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps 'tight.eps'  & del C:\Users\vlg\AppData\Local\Temp\oct-3eMH9a.eps '
octave:4> print -loose -debug loose.eps
epstool command: 'C:\Octave\OCTAVE~1.0\mingw64\bin\gs.exe -dQUIET -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVICE=eps2write -sOutputFile=""loose.eps"" -'
opengl-pipeline: 'C:\Octave\OCTAVE~1.0\mingw64\bin\gs.exe -dQUIET -dNOPAUSE -dBATCH -dSAFER -dAutoRotatePages=/None -sDEVICE=eps2write -sOutputFile=""loose.eps"" -'

Again, only  the loose one gets created.

Anonymous
Thu 31 Oct 2019 11:48:13 AM UTC, comment #5: 

You did not mention the error message you get when using "-tight", which is pretty clear to me: you either don't have "epstool" installed (in which case you need to install it, this is not a bug) or Octave is unable to find it. This is for linux.

Now on your Windows 10 machine, you probably won't get this error message since epstool is bundled with the Octave. Could you run this script again on Windows?

Pantxo Diribarne <pantxo>
Project Member
Thu 31 Oct 2019 10:44:20 AM UTC, comment #4: 

I get

octave:5> plot (1:10)
octave:6> print -tight -debug /tmp/tight.eps
error: print.m: 'epstool' is required for specified output format, but binary is not available in PATH
error: called from
    print>epstool at line 809 column 7
    __opengl_print__ at line 42 column 16
    print at line 710 column 16
octave:6> print -loose -debug /tmp/loose.eps
epstool command: ' cat > '/tmp/loose.eps' '
opengl-pipeline: ' cat > '/tmp/loose.eps' '

The loose one's is the bin, the tight one's not.I get

octave:5> plot (1:10)
octave:6> print -tight -debug /tmp/tight.eps
error: print.m: 'epstool' is required for specified output format, but binary is not available in PATH
error: called from
    print>epstool at line 809 column 7
    __opengl_print__ at line 42 column 16
    print at line 710 column 16
octave:6> print -loose -debug /tmp/loose.eps
epstool command: ' cat > '/tmp/loose.eps' '
opengl-pipeline: ' cat > '/tmp/loose.eps' '

The loose one's is the bin, the tight one's not.

This is from Void, I just have the octave pkg as provided by the glibc repo, if it matters any.

(file #47774)

Anonymous
Thu 31 Oct 2019 10:23:21 AM UTC, comment #3: 

Yes, "looseinset" is a hidden property. It is used by internal functions and you should normally not have to play with it, it is even discouraged, unless you know what you are doing.

Could you run the script below with the hidden option (again :-))  "-debug" so that we can eventually see what is going wrong:

plot (1:10)
print -tight -debug /tmp/tight.eps
print -loose -debug /tmp/loose.eps

For me this produces two files which I attached, and the following outputs on stdout:

>> plot (1:10)
>> print -tight -debug /tmp/tight.eps
epstool command: 'cat > /tmp/oct-EPwBgs.eps ; /usr/bin/epstool --quiet --copy --bbox /tmp/oct-EPwBgs.eps '/tmp/tight.eps'  ; rm /tmp/oct-EPwBgs.eps '
opengl-pipeline: 'cat > /tmp/oct-EPwBgs.eps ; /usr/bin/epstool --quiet --copy --bbox /tmp/oct-EPwBgs.eps '/tmp/tight.eps'  ; rm /tmp/oct-EPwBgs.eps '
>> print -loose -debug /tmp/loose.eps
epstool command: ' cat > '/tmp/loose.eps' '
opengl-pipeline: ' cat > '/tmp/loose.eps' '

I attached the resulting files, obtained on debian stretch with self compiled Octave 5.1.

(file #47772, file #47773)

Pantxo Diribarne <pantxo>
Project Member
Thu 31 Oct 2019 08:27:43 AM UTC, comment #2: 

comment #1:

> * What graphics toolkit are you using?

graphics_toolkit is qt on both OS, although I don't know how to change it, and of what use it'll be, haven't read that part of the documentation.

> * You marked this bug as affecting any OS. Did you try on several different OSs?

On Void Linux and Win10 there is no output file. Although, and I should've mentioned this earlier, it does process something, just that it doesn't result in an output file.

> In any event, you can tweak the figure to change the margins using the hidden axes property "looseinset", e.g.:
> set (gca, "looseinset", [0.02 0.02 0.02 0.02])


The documentation for 5.1.0 doesn't have anything about `looseinset`, only a

tightinset (read-only): four-element vector
    Size of the [left bottom right top] margins around the axes that enclose labels and title annotations.

However, the example given works handsomely with the 1:10; fiddling around with the numbers:
[0, 0, 0, 0] tightened the vertical margins, while [1, 1, 1, 1] fully excised them, also lessening the horizontal one, thought they're still big- together around a 1/3--1/2 of the actual figure width, actual plot area being a (almost always) square in size.

Anonymous
Wed 30 Oct 2019 03:30:50 PM UTC, comment #1: 

There are already a couple of know issues about the -tight option (at least bug #55723 and bug #56289). To determine if your problem is already reported, we'll need some more info:

  • What graphics toolkit are you using?
  • You marked this bug as affecting any OS. Did you try on several different OSs?

In any event, you can tweak the figure to change the margins using the hidden axes property "looseinset", e.g.:

plot (1:10)
set (gca, "looseinset", [0.02 0.02 0.02 0.02])
print toto.eps

Pantxo Diribarne <pantxo>
Project Member
Wed 30 Oct 2019 03:10:16 PM UTC, original submission:  

Trying to get the giant white margins removed still in Octave, rather than in latex via cropping, I found out that '-Sx,y' scales rather than crops, and that I always get the margins. .eps has a -tight/-loose option, the latter being default, with which a file is created, be it with the option implicit or explicit.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47774:  loose.eps added by None (7KiB - image/x-eps)
file #47772:  loose.eps added by pantxo (7KiB - image/x-eps)
file #47773:  tight.eps added by pantxo (7KiB - image/x-eps)

 

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 None (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-31 None Attached File- => Added loose.eps, #47774
    2019-10-31 pantxo Attached File- => Added loose.eps, #47772
        Attached File- => Added tight.eps, #47773
        CategoryOctave Function => Plotting with OpenGL
        StatusNeed Info => Works For Me
    2019-10-30 pantxo StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5