|
From: | Ian McCallion |
Subject: | Re: Print to png errors with ghostscript. |
Date: | Sun, 14 Apr 2019 15:28:00 +0100 |
Firstly, my apologies, I'm not massively familiar with octave (or even matlab), I'm trying to transition a simple plotting and saving function from MATLAB that I wrote last year and use very regularly to speed up my workflow. I'm also not very familiar with terminal and UNIX-y things on the mac but I'm doing my best to get my head round it!Version details:Mac OS X 10.14.3 Mojave.Octave 5.1.0 from homebrewXQuartz 2.7.11 (I don't know if octave uses this??)gnuplot (Version 5.2.6.1)ghostscript (version 9.26_1)fltk (version 1.3.5)(I followed this tutorial https://www.ritchieng.com/octave-mac- . I wasn't able to get the gnuplot --with-x11 to work so I've just installed gnuplot with brew install gnuplot. XQuartz is already on my system as above.)setup/#4b-create-and-edit- octaverc-file I'm using the GUI with an .app as described in https://wiki.octave.org/Octave_for_macOS My issue is that I'm getting an error message when I try to run saveas or print to create a PNG. Using for eg:saveas(fig, ' Name.png');
orprint -deps foo.epsThe error message on 5.1.0 reads:"warning: print.m: Ghostscript binary is not available. Only eps output is possiblewarning: called from__print_parse_opts__ at line 487 column 7print at line 416 column 8saveas at line 110 column 3soakprocess2 at line 52 column 1"My .octaverc currently reads:## Begin save-path auto-created section, do not editaddpath ('/Users/Rowan/AW Google Drive/Repair Data/SoakTests/MATLAB', '-begin');## End savepath auto-created sectionsetenv ("GNUTERM", "X11")setenv('GNUTERM','qt')graphics_toolkit("gnuplot")cmd_path = getenv ("path");gs_path = "/usr/local/opt/ghostscript";if (isempty (strfind (cmd_path, gs_path)))setenv("path", strcat (cmd_path, pathsep(), gs_path));endiBut I'm getting a startup error so I've clearly done something wrong there too. I suspect it's because all the examples of setting gs_path online seem to be for windows.parse error near line 16 of file /Users/Rowan/.octavercThat's also confusing because there are only 15 lines!
[Prev in Thread] | Current Thread | [Next in Thread] |