From 1665b78a54a0b67ce6b61c2b8ebfe0f409a47ae4 Mon Sep 17 00:00:00 2001 From: Giorgio Calderone Date: Sun, 14 Jan 2018 00:45:49 +0100 Subject: [PATCH] Minor changes --- README.md | 2 +- src/Gnuplot.jl | 4 ++++ src/GnuplotInternals.jl | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c3aa74..e34a9df 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ m = a * sin.(b + c * x) gp.session() # Plot again using the @gp macro. -title = "Fit param: " * @sprintf("a=%5.2f, b=%5.2f, c=%5.2f", a, b ,c), +title = "Fit param: " * @sprintf("a=%5.2f, b=%5.2f, c=%5.2f", a, b ,c) @gp("set key horizontal", "set grid", :multi, "layout 2,1", title=title, ylab="Y label", diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index 589ed40..a8a6d39 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -1,3 +1,5 @@ +isdefined(Base, :__precompile__) && __precompile__() + module Gnuplot using AbbrvKW @@ -739,6 +741,8 @@ macro gpi(args...) if isa(arg, Expr) && (arg.head == :quote) && (arg.args[1] == :reset) push!(exprBlock.args, :(Gnuplot.reset())) + elseif isa(arg, Expr) && (arg.head == :quote) && (arg.args[1] == :dump) + push!(exprBlock.args, :(Gnuplot.dump())) elseif isa(arg, Expr) && (arg.head == :quote) && (arg.args[1] == :plot) pendingPlot = true elseif isa(arg, Expr) && (arg.head == :quote) && (arg.args[1] == :multi) diff --git a/src/GnuplotInternals.jl b/src/GnuplotInternals.jl index 42193c9..18dcab1 100644 --- a/src/GnuplotInternals.jl +++ b/src/GnuplotInternals.jl @@ -1,3 +1,5 @@ +isdefined(Base, :__precompile__) && __precompile__() + ###################################################################### # MODULE GnuplotInternals (private functions and definitions) ###################################################################### @@ -89,7 +91,7 @@ mutable struct MainState handles::Vector{Int} # handles of gnuplot sessions curPos::Int # index in the procs, states and handles array of current session - MainState() = new(:cyan, :yellow, 2, + MainState() = new(:cyan, :yellow, 0, "", "", Vector{GnuplotProc}(), Vector{GnuplotSession}(), Vector{Int}(), 0) end