octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #53888] figure handle is not cleared in gnuplo


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53888] figure handle is not cleared in gnuplot
Date: Mon, 14 May 2018 05:19:55 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #3, bug #53888 (project octave):

The gnuplot code is mainly in the form of script files, not source code.  The
portion in source code is simple the mechanism that creates a pipe, forks a
process to run gnuplot and connects the pipe to that process.  The script
files are in


scripts/plot/util
scripts/plot/util/private


The main files are


__gnuplot_draw_axes__.m
__gnuplot_draw_figure__.m


The one routine that sort of gathers info about gnuplot is


__gnuplot_version__.m


but that is done using a system command


    [status, output] = system (sprintf ('"%s" --version', gnuplot_binary
()));


not by interacting with the existing gnuplot process via the pipe.

Again, gnuplot doesn't provide any information about what "figures" are open
because everything is a basic terminal.  The sorts of info that gnuplot
provides is


gnuplot> show var all

        All available variables:
        pi = 3.14159265358979
        GNUTERM = "qt"
        NaN = NaN
        GPVAL_TERM = "qt"
        GPVAL_TERMOPTIONS = "0 font \"Sans,9\""
        GPVAL_OUTPUT = ""
        GPVAL_ENCODING = "default"
        GPVAL_MINUS_SIGN = "-"
        GPVAL_MICRO = "u"
        GPVAL_DEGREE_SIGN = "\302\260"
        GPVAL_VERSION = 5.3
        GPVAL_PATCHLEVEL = "0"
        GPVAL_COMPILE_OPTIONS = "    -READLINE  +LIBREADLINE  +HISTORY  \n   
-BACKWARDS_COMPATIBILITY  +OBJECTS  +STATS +EXTERNAL_FUNCTIONS \n    +LIBCERF 
+GD_PNG  +GD_JPEG  +GD_TTF  +GD_GIF  +ANIMATION  \n    -USE_CWDRC  +X11 
+X11_EXTERNAL +USE_MOUSE  +HIDDEN3D_QUADTREE  \n"
        GPVAL_MULTIPLOT = 0
        GPVAL_PLOT = 1
        GPVAL_SPLOT = 0
        GPVAL_TERMINALS = " cairolatex canvas cgm context domterm dumb dxf 
eepic emf
emtex epscairo epslatex fig gif hpgl jpeg latex lua mf mp pcl5 pdfcairo png
pngcairo postscript pslatex pstex pstricks qms qt sixelgd svg tek40xx tek410x
texdraw tgif tikz tkcanvas tpic unknown vttek wxt x11 xlib xterm "
        GPVAL_pi = 3.14159265358979
        GPVAL_NaN = NaN
        GPVAL_SYSNAME = "Linux"
        GPVAL_MACHINE = "x86_64"
        GPVAL_BITS = 64
        GPVAL_ERRNO = 1
        GPVAL_ERRMSG = "invalid command"
        GPVAL_SYSTEM_ERRNO = 0
        GPVAL_SYSTEM_ERRMSG = ""
        GPVAL_PWD = "/home/sebald/apartments/lake_forest/comed/bills/2015"
        GPVAL_LINENO = 0
        ARGC = 0
        ARG0 = ""
        GPVAL_LAST_PLOT = "plot x"
        GPVAL_X_MIN = -10.0
        GPVAL_X_MAX = 10.0
        GPVAL_X_LOG = 10.0
        GPVAL_DATA_X_MIN = 8.98846567431158e+307
        GPVAL_DATA_X_MAX = -8.98846567431158e+307
        GPVAL_Y_MIN = -10.0
        GPVAL_Y_MAX = 10.0
        GPVAL_Y_LOG = 10.0
        GPVAL_DATA_Y_MIN = -10.0
        GPVAL_DATA_Y_MAX = 10.0
        GPVAL_X2_MIN = -10.0
        GPVAL_X2_MAX = 10.0
        GPVAL_X2_LOG = 10.0
        GPVAL_DATA_X2_MIN = 8.98846567431158e+307
        GPVAL_DATA_X2_MAX = -8.98846567431158e+307
        GPVAL_Y2_MIN = -10.0
        GPVAL_Y2_MAX = 10.0
        GPVAL_Y2_LOG = 10.0
        GPVAL_DATA_Y2_MIN = 8.98846567431158e+307
        GPVAL_DATA_Y2_MAX = -8.98846567431158e+307
        GPVAL_Z_MIN = -10.0
        GPVAL_Z_MAX = 10.0
        GPVAL_Z_LOG = 10.0
        GPVAL_DATA_Z_MIN = 0.0
        GPVAL_DATA_Z_MAX = 0.0
        GPVAL_CB_MIN = 8.98846567431158e+307
        GPVAL_CB_MAX = -8.98846567431158e+307
        GPVAL_CB_LOG = 10.0
        GPVAL_DATA_CB_MIN = 8.98846567431158e+307
        GPVAL_DATA_CB_MAX = -8.98846567431158e+307
        GPVAL_T_MIN = -5.0
        GPVAL_T_MAX = 5.0
        GPVAL_T_LOG = 10.0
        GPVAL_U_MIN = -5.0
        GPVAL_U_MAX = 5.0
        GPVAL_U_LOG = 10.0
        GPVAL_V_MIN = -5.0
        GPVAL_V_MAX = 5.0
        GPVAL_V_LOG = 10.0
        GPVAL_R_MIN = 8.98846567431158e+307
        GPVAL_R_MAX = -8.98846567431158e+307
        GPVAL_R_LOG = 10.0
        GPVAL_TERM_XMIN = 385
        GPVAL_TERM_XMAX = 6189
        GPVAL_TERM_YMIN = 280
        GPVAL_TERM_YMAX = 4659
        GPVAL_TERM_XSIZE = 6400
        GPVAL_TERM_YSIZE = 4800
        GPVAL_TERM_SCALE = 1
        GPVAL_VIEW_MAP = 0
        GPVAL_VIEW_ROT_X = 60.0
        GPVAL_VIEW_ROT_Z = 30.0
        GPVAL_VIEW_SCALE = 1.0
        GPVAL_VIEW_ZSCALE = 1.0
        GPVAL_VIEW_AZIMUTH = 0.0
        GPVAL_VIEW_XCENT = 1.0
        GPVAL_VIEW_YCENT = 0.0
        GPVAL_VIEW_RADIUS = 0.0


Nothing in that list indicates what terminals are visible, and still that
would mean polling that information rather than gnuplot sending information
through the pipe to Octave core.

There is one way that such information can be had, if one knows gnuplot well
enough.  Some terminals like Qt and x11 will allow passing information to
gnuplot's "term" command that identifies an *existing* window that can serve
as gnuplot's canvas.  That is, rather than creating a new window, gnuplot
would render in an existing window.  So, Octave would have to create it's own
Qt window, then select gnuplot's Qt terminal and pass the window ID to
gnuplot.  All that work isn't worth it, as I see it.  If it were a very
limited application with specific selection of gnuplot's Qt terminal, then
sure.  But not in a more general app where user's are selecting the terminal
type.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53888>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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