bugGNU Octave - Bugs: bug #56473, print error with Octave 5.1.0

 
 

bug #56473: print error with Octave 5.1.0

Submitted by:  None
Submitted on:  Tue 11 Jun 2019 03:22:12 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Duplicate Assigned to:  None
Originator Name:  Ignacio López Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  5.1.0
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Fri 14 Jun 2019 11:17:12 AM UTC, comment #5: 

We don't have a print dialog that would allow fine tuning the printing options, but the good news is that you can create your own menus:

function print_ogl (h)
  [f, fdir] = uiputfile ({"*.gif;*.jpg;*.png;*.tiff", "Bitmap Image Formats"}, "Figure file name", "myfig.png");
  if (ischar (f))
    fname = fullfile (fdir, f);
    print (gcbf (), "-opengl", fname);
  endif
endfunction

hmain = uimenu ("label", "Print");
h1 = uimenu (hmain, "label", "print with -opengl", ...
             "callback", @print_ogl);

Closing report as a duplicate of multiple others.

Pantxo Diribarne <pantxo>
Project Member
Thu 13 Jun 2019 08:57:27 AM UTC, comment #4: 

Thank you very much! Your response is very good.

Only another question, if I used saveas function, how could I force the opengl renderer?

Anonymous
Wed 12 Jun 2019 07:38:13 PM UTC, comment #3: 

Your use case meats many known bugs:

  • Bug #33118: The -opengl renderer doesn't handle rotated text (labels here) better than on-screen and, Octave chooses to use the -painters renderer instead, even for raster outputs.

If you are happy with the on-screen result (multiples of 90° rotation), and that you only want raster outputs (like JPEG or GIF) then you can force the -opengl renderer

print -djpg -opengl TV1_opengl;

  • Bug #48689: You are using the axis command to only show part of the contour patches, but then you hit a bug in Mesa opengl driver. The output of the -painters renderer is huge, overly complicated and corrupted, which Ghostscript (used for conversion to JPEG)  doesn't seem to like on Windows. Note that on linux it takes ages to get a readable but huge and ugly JPEG file.

The easiest workaround is to resize your contour instead of changing axes limits:

VX=load('MXTV1.txt');
VY=load('MYTV1.txt');
MZ=load('MZTV1.txt');
stop_row = 60;
VY = VY(1:stop_row);
MZ = MZ(1:stop_row,:);
...
axis auto
print -djpg TV1_painters;

  • Bug #52764: The warning is due to the non ascii charater "ú". You can workaround this one using the "-svgconvert" option:

...
axis auto
print -djpg -svgconvert TV1_painters_svg;

Does this cover all the issues you raised?

Pantxo Diribarne <pantxo>
Project Member
Wed 12 Jun 2019 10:39:48 AM UTC, comment #2: 

I send you an attached document with an example.

(file #47078)

Anonymous
Tue 11 Jun 2019 07:04:35 PM UTC, comment #1: 

Can you please add minimal examples to reproduce the errors you are seeing?

Pantxo Diribarne <pantxo>
Project Member
Tue 11 Jun 2019 03:22:12 PM UTC, original submission:  

two examples of this kind of error, when I try to save a figure:

1)
error: print.m: GIF output is not available for OpenGL graphics toolkits execution error in graphics callback function
2)
warning: print: only ASCII characters are supported for EPS and derived formats.
warning: called from
    _opengl_print_ at line 193 column 7
    print at line 710 column 16
    saveas at line 110 column 3
    _add_default_menu_>__save_as__ at line 145 column 7
    _add_default_menu_>save_cb at line 126 column 5
Error: /undefined in -1.#QNAN
Operand stack:
   --nostringval--   74.88   380.224   0.267004   0.00487433   0.329415   75.2222   399.952   0   3.58732e-42
   1.17588e-38   75.054   399.952   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nos
tringval--   --nostringval--   --nostringval--   false   1   %stopped_push   2029   1   3   %oparray_pop   20
28   1   3   %oparray_pop   --nostringval--   2009   1   3   %oparray_pop   1868   1   3   %oparray_pop   --n
ostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stoppe
d_push   --nostringval--
Dictionary stack:
   --dict:965/1684(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--   --dict:43/64(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.26: Unrecoverable error, exit code 1
error: gl2ps_renderer::draw: internal pipe error
error: parse error
error: called from
    _opengl_print_ at line 193 column 7
    print at line 710 column 16

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47078:  Example.rar added by None (17KiB - application/octet-stream)
file #47073:  PRINT_ERROR_OCTAVE.JPG added by None (244KiB - image/jpeg - print error with OCTAVE v5.10)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -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-06-14 pantxo Open/ClosedOpen => Closed
    2019-06-12 pantxo StatusNeed Info => Duplicate
    2019-06-12 siko1056 Summaryprint error with OCTAVE v 5.10 => print error with Octave 5.1.0
    2019-06-12 None Attached File- => Added Example.rar, #47078
    2019-06-11 pantxo StatusNone => Need Info
    2019-06-11 None Attached File- => Added PRINT_ERROR_OCTAVE.JPG, #47073

    Back to the top


    Powered by Savane 3.5