changeset 20885:e5f78891ad9e

Allow doc's images to be generated using gnuplot when osmesa isn't available. * geometryimages.m (set_graphics_toolkit): Backup osmesa with gnuplot. * interpimages.m (set_graphics_toolkit): ditto. * plotimages.m (set_graphics_toolkit): ditto. * sparseimages.m (set_graphics_toolkit): ditto.
author Ben Abbott <bpabbott@mac.com>
date Sun, 13 Dec 2015 14:09:19 -0500
parents f1b2a2dbc0e1
children 3c986b688596
files doc/interpreter/geometryimages.m doc/interpreter/interpimages.m doc/interpreter/plotimages.m doc/interpreter/sparseimages.m doc/interpreter/splineimages.m
diffstat 5 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/geometryimages.m	Sun Dec 13 07:59:40 2015 -0800
+++ b/doc/interpreter/geometryimages.m	Sun Dec 13 14:09:19 2015 -0500
@@ -141,6 +141,13 @@
 function set_graphics_toolkit ()
   if (isempty (available_graphics_toolkits ()))
     error ("no graphics toolkit available for plotting");
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
+     && ! octave_config_info ().features.OSMESA)
+    if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
+      error ("no graphics toolkit available for offscreen plotting");
+    else
+      graphics_toolkit ("gnuplot");
+    endif
   endif
 endfunction
 
--- a/doc/interpreter/interpimages.m	Sun Dec 13 07:59:40 2015 -0800
+++ b/doc/interpreter/interpimages.m	Sun Dec 13 14:09:19 2015 -0500
@@ -85,6 +85,13 @@
 function set_graphics_toolkit ()
   if (isempty (available_graphics_toolkits ()))
     error ("no graphics toolkit available for plotting");
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
+     && ! octave_config_info ().features.OSMESA)
+    if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
+      error ("no graphics toolkit available for offscreen plotting");
+    else
+      graphics_toolkit ("gnuplot");
+    endif
   endif
 endfunction
 
--- a/doc/interpreter/plotimages.m	Sun Dec 13 07:59:40 2015 -0800
+++ b/doc/interpreter/plotimages.m	Sun Dec 13 14:09:19 2015 -0500
@@ -122,6 +122,13 @@
 function set_graphics_toolkit ()
   if (isempty (available_graphics_toolkits ()))
     error ("no graphics toolkit available for plotting");
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
+     && ! octave_config_info ().features.OSMESA)
+    if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
+      error ("no graphics toolkit available for offscreen plotting");
+    else
+      graphics_toolkit ("gnuplot");
+    endif
   endif
 endfunction
 
--- a/doc/interpreter/sparseimages.m	Sun Dec 13 07:59:40 2015 -0800
+++ b/doc/interpreter/sparseimages.m	Sun Dec 13 14:09:19 2015 -0500
@@ -243,6 +243,13 @@
 function set_graphics_toolkit ()
   if (isempty (available_graphics_toolkits ()))
     error ("no graphics toolkit available for plotting");
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
+     && ! octave_config_info ().features.OSMESA)
+    if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
+      error ("no graphics toolkit available for offscreen plotting");
+    else
+      graphics_toolkit ("gnuplot");
+    endif
   endif
 endfunction
 
--- a/doc/interpreter/splineimages.m	Sun Dec 13 07:59:40 2015 -0800
+++ b/doc/interpreter/splineimages.m	Sun Dec 13 14:09:19 2015 -0500
@@ -166,6 +166,13 @@
 function set_graphics_toolkit ()
   if (isempty (available_graphics_toolkits ()))
     error ("no graphics toolkit available for plotting");
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
+     && ! octave_config_info ().features.OSMESA)
+    if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
+      error ("no graphics toolkit available for offscreen plotting");
+    else
+      graphics_toolkit ("gnuplot");
+    endif
   endif
 endfunction