help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to plot using gnuplot WXT terminal type


From: John W. Eaton
Subject: How to plot using gnuplot WXT terminal type
Date: Fri, 27 Jul 2007 01:13:46 -0400

On 27-Jul-2007, Leonardo Muttoni wrote:

| Hi Everybody!
| 
| I would like to know if there is a way to tell Octave to use the
| gnuplot terminal "WXT" (based on wxWidgets). I've tried hard and no
| success.... The gnuplot terminal that Octave is using is a plain old
| X11.
| 
| If I use the gnuplot program directly, I can get a plot with WXT
| terminal type by just entering the command:
| 
| gnuplot> set term x11
| 
| and this works....

Don't you mean "set term wxt" here?

| I've tried to put this command in ~/.gnuplot file, and this works for
| gnuplot program, but plots inside Octave continue using X11 gnuplot
| terminal.
| 
| the following octave command also don't work:
| 
| octave:1> __gnuplot_set__ terminal wxt

The __gnuplot_X__ commands are not connected in any way to the new
plotting functions in Octave 2.9.N for N > 9.

| What I'm doing wrong?

Try the following patch and also set

  GNUTERM=wxt

in your environment before starting Octave.

jwe


scripts/ChangeLog:

2007-07-27  John W. Eaton  <address@hidden>

        * plot/drawnow.m: Only set default value for term if GNUTERM is
        not set in the environment.


Index: scripts/plot/drawnow.m
===================================================================
RCS file: /cvs/octave/scripts/plot/drawnow.m,v
retrieving revision 1.18
diff -u -u -r1.18 drawnow.m
--- scripts/plot/drawnow.m      18 Jul 2007 17:43:51 -0000      1.18
+++ scripts/plot/drawnow.m      27 Jul 2007 05:10:32 -0000
@@ -109,17 +109,19 @@
 
       ## Guess the terminal type.
       term = getenv ("GNUTERM");
-      if (isempty (term) && ! isempty (getenv ("DISPLAY")))
-        term = "x11";
-      elseif (! isunix ())
-        term = "windows";
-      else
-        term = "aqua";
-        ## This should really be checking for os x before setting
-        ## the terminal type to aqua, but nobody will notice because
-        ## every other unix will be using x11 and windows will be
-        ## using windows.  Those diehards still running octave from
-        ## a linux console know how to set the GNUTERM variable.
+      if (isempty (term))
+       if (! isempty (getenv ("DISPLAY")))
+          term = "x11";
+       elseif (! isunix ())
+          term = "windows";
+       else
+         ## This should really be checking for os x before setting
+         ## the terminal type to aqua, but nobody will notice because
+         ## every other unix will be using x11 and windows will be
+         ## using windows.  Those diehards still running octave from
+         ## a linux console know how to set the GNUTERM variable.
+          term = "aqua";
+       endif
       endif
 
       ## If no 'h' (why not?) then open the terminal as Figure 0.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]