Skip to content
Snippets Groups Projects
Commit 08ab7246 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

gnuplot-rif: do not use wxt as the default terminal

Indeed, it seems it is not supported by gnuplot anymore (at least it
is disabled in the version shipped with debian 8).
parent f72f2b4d
No related branches found
No related tags found
No related merge requests found
OASISFormat: 0.4 OASISFormat: 0.4
Name: lutils Name: lutils
Version: 1.9 Version: 1.10
Authors: Erwan Jahier Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr Maintainers: erwan.jahier@imag.fr
License: GPL-3 License: GPL-3
......
\newcommand{\version}{1.9} \newcommand{\version}{1.10}
\newcommand{\sha}{c83d040} \newcommand{\sha}{f72f2b4}
\newcommand{\versionname}{none} \newcommand{\versionname}{none}
\newcommand{\versiondate}{14-06-16} \newcommand{\versiondate}{01-12-16}
# OASIS_START # OASIS_START
# DO NOT EDIT (digest: a42aedacb025150703bee04eb47df1d5) # DO NOT EDIT (digest: 54fedc79891273606f6979d57066839f)
version = "1.9" version = "1.10"
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)." description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
requires = "unix str camlp4 num" requires = "unix str camlp4 num"
archive(byte) = "lutils.cma" archive(byte) = "lutils.cma"
......
(* Time-stamp: <modified the 02/02/2016 (at 11:03) by Erwan Jahier> *) (* Time-stamp: <modified the 08/09/2016 (at 09:50) by Erwan Jahier> *)
(*----------------------------------------------------------------------- (*-----------------------------------------------------------------------
** This file may only be copied under the terms of the GNU Library General ** This file may only be copied under the terms of the GNU Library General
** Public License ** Public License
...@@ -203,7 +203,8 @@ let (read_ressource_file : unit -> unit) = ...@@ -203,7 +203,8 @@ let (read_ressource_file : unit -> unit) =
(********************************************************************************) (********************************************************************************)
type terminal_kind = Jpg | Ps | Pdf | Cps | Eps | Latex | X11| Wxt | NoDisplay type terminal_kind =
Jpg | Ps | Pdf | Cps | Eps | Latex | X11| Wxt | Qt | NoDisplay | Default
let terminal_kind_to_string tk file = let terminal_kind_to_string tk file =
let base_fn = Filename.chop_extension file in let base_fn = Filename.chop_extension file in
match tk with match tk with
...@@ -213,11 +214,13 @@ let terminal_kind_to_string tk file = ...@@ -213,11 +214,13 @@ let terminal_kind_to_string tk file =
| Cps -> "set term post color solid \nset output \"" ^ base_fn ^ ".ps\"\n" | Cps -> "set term post color solid \nset output \"" ^ base_fn ^ ".ps\"\n"
| Eps -> "set term post color solid eps\nset output \"" ^ base_fn ^ ".eps\"\n" | Eps -> "set term post color solid eps\nset output \"" ^ base_fn ^ ".eps\"\n"
| Latex -> "set term solid latex\nset output \"" ^ base_fn ^ ".tex\"\n" | Latex -> "set term solid latex\nset output \"" ^ base_fn ^ ".tex\"\n"
| X11 -> "set terminal x11 persist" | X11 -> "set terminal x11"
| Qt -> "set terminal qt"
| Default -> ""
| Wxt -> "set terminal wxt persist font \"Arial,12\" " | Wxt -> "set terminal wxt persist font \"Arial,12\" "
| NoDisplay -> " " | NoDisplay -> " "
let terminal = ref Wxt let terminal = ref Default
let gen_gnuplot_file vars to_hide ttbl file tk = let gen_gnuplot_file vars to_hide ttbl file tk =
let oc = open_out file in let oc = open_out file in
...@@ -270,8 +273,9 @@ set pointsize 0.2"); ...@@ -270,8 +273,9 @@ set pointsize 0.2");
if !grid then put " if !grid then put "
set grid back"; set grid back";
put (" put ("
set mouse " ^ set mouse
(if num_nb = 0 then "0" else "set key right top title \"Numeric variables\" box 3")^ " ^
(if num_nb = 0 then "0" else "set key outside title \"Numeric variables\" box 3")^
" "
set xlabel \"steps\" set xlabel \"steps\"
...@@ -335,8 +339,9 @@ unset ytics ...@@ -335,8 +339,9 @@ unset ytics
set ytics range_10 set ytics range_10
"; ";
flush stderr; flush stderr;
if (not (List.mem tk [Wxt; X11 ;NoDisplay])) then put "set size 1.3,1\n"; if (not (List.mem tk [Wxt; Default; Qt; X11 ;NoDisplay])) then put "set size 1.3,1\n";
put "unset output\nreplot\n"; put "unset output\nreplot\n";
if (List.mem tk [Qt; X11; Default]) then put "pause mouse close\n";
close_out oc; close_out oc;
file file
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
** **
*) *)
type terminal_kind = Jpg | Ps | Pdf | Cps | Eps | Latex | X11| Wxt | NoDisplay type terminal_kind =
Jpg | Ps | Pdf | Cps | Eps | Latex | X11| Wxt | Qt | NoDisplay | Default
val terminal : terminal_kind ref val terminal : terminal_kind ref
val window_size : int ref val window_size : int ref
val min_step:int option ref val min_step:int option ref
......
(* Time-stamp: <modified the 04/12/2013 (at 14:33) by Erwan Jahier> *) (* Time-stamp: <modified the 08/09/2016 (at 09:49) by Erwan Jahier> *)
(*----------------------------------------------------------------------- (*-----------------------------------------------------------------------
** This file may only be copied under the terms of the GNU Library General ** This file may only be copied under the terms of the GNU Library General
** Public License ** Public License
...@@ -41,16 +41,27 @@ let rec speclist = ...@@ -41,16 +41,27 @@ let rec speclist =
"\t<max> only display steps < max (ignored in -dyn mode)"; "\t<max> only display steps < max (ignored in -dyn mode)";
"-nogrid",Arg.Unit (fun _ -> (grid := false)), "-nogrid",Arg.Unit (fun _ -> (grid := false)),
"remove the grid (useful with -dyn)"; "remove the grid (useful with -dyn)\n";
"--hide-var",Arg.String (fun str -> (vars_to_hide := str :: !vars_to_hide)), "--hide-var",Arg.String (fun str -> (vars_to_hide := str :: !vars_to_hide)),
"<string> hide a variable (one can use the wildcard '*')"; "<string> hide a variable (one can use the wildcard '*')";
"-hv",Arg.String (fun str -> (vars_to_hide := str :: !vars_to_hide)),
"<string> shortcut for --hide-var\n";
"--show-var",Arg.String (fun str -> (vars_to_show := str :: !vars_to_show)), "--show-var",Arg.String (fun str -> (vars_to_show := str :: !vars_to_show)),
"<string> show a wildcard-hided variable\n"; "<string> show a wildcard-hided variable";
"-sv",Arg.String (fun str -> (vars_to_show := str :: !vars_to_show)),
"<string> shortcut for --show-var
Changing the default gnuplot terminal:";
"-wxt",Arg.Unit (fun _ -> (terminal := Wxt)), "-wxt",Arg.Unit (fun _ -> (terminal := Wxt)),
"\t launch gnuplot with the wxt terminal (default)"; "\t launch gnuplot with the wxt terminal";
"-qt",Arg.Unit (fun _ -> (terminal := Qt)),
"\t launch gnuplot with the qt terminal";
"-x11",Arg.Unit (fun _ -> (terminal := X11)), "-x11",Arg.Unit (fun _ -> (terminal := X11)),
"\t launch gnuplot with the X11 terminal"; "\t launch gnuplot with the X11 terminal";
......
let str="1.9" let str="1.10"
let sha="c83d040" let sha="f72f2b4"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment