more display fun

This commit is contained in:
Thomas Breloff 2015-09-22 14:56:37 -04:00
parent eced15b712
commit ec939f9f9a
12 changed files with 206 additions and 226 deletions

View File

@ -185,6 +185,8 @@ plot(rand(100,4); color = [:red, RGB(0,0,1)], # lines 1 and 3 are red, lines
__Tip__: Not all features are supported for each backend, but you can see what's supported by calling the functions: `supportedAxes()`, `supportedTypes()`, `supportedStyles()`, `supportedMarkers()`, `subplotSupported()`
__Tip__: Call `gui()` to display the plot in a window. Interactivity depends on backend. Showing at the REPL implicitly calls this.
## TODO features:
- [x] Plot vectors/matrices/functions

View File

@ -41,6 +41,7 @@ export
ylabel!,
savepng,
gui,
backends,
aliases,
@ -103,23 +104,18 @@ ylabel!(plt::Plot, s::AbstractString) = plot!(plt; ylabel = s)
savepng(args...; kw...) = savepng(currentPlot(), args...; kw...)
savepng(plt::PlottingObject, fn::AbstractString; kw...) = (io = open(fn); writemime(io, MIME"image/png", plt); close(io))
savepng(plt::PlottingObject, fn::AbstractString; kw...) = (io = open(fn, "w"); writemime(io, MIME("image/png"), plt); close(io))
# savepng(plt::PlottingObject, args...; kw...) = savepng(plt.plotter, plt, args...; kw...)
# savepng(::PlottingPackage, plt::PlottingObject, fn::AbstractString, args...) = error("unsupported") # fallback so multiple dispatch doesn't get confused if it's missing
# function Base.writemime(io::IO, ::MIME"image/png", plt::Plot)
gui(plt::PlottingObject = currentPlot()) = display(PlotsDisplay(), plt)
# function Base.writemime(io::IO, ::MIME"text/html", plt::Plot)
# # print(io, "<p>")
# png = MIME("image/png")
# print(io, "<img src=\"data:image/png; base64,", base64encode(writemime, png), "\" />")
# end
# override the REPL display to open a gui window
Base.display(::Base.REPL.REPLDisplay, ::MIME"text/plain", plt::PlottingObject) = gui(plt)
# override the REPL display
Base.display(::Base.REPL.REPLDisplay, ::MIME"text/plain", plt::PlottingObject) = display(PlotsDisplay(), plt)
function __init__()
global const CURRENT_BACKEND = pickDefaultBackend()

View File

@ -265,7 +265,8 @@ function getPlotArgs(pkg::PlottingPackage, kw, idx::Int)
end
# convert color
d[:background_color] = getBackgroundRGBColor(d[:background_color], d)
handlePlotColors(pkg, d)
# d[:background_color] = getBackgroundRGBColor(d[:background_color], d)
# no need for these
delete!(d, :x)

View File

@ -211,53 +211,35 @@ function plot!(::GadflyPackage, plt::Plot; kw...)
end
function findGuideAndSet(plt::Plot, t::DataType, s::AbstractString)
for guide in plt.o.guides
function findGuideAndSet(gplt, t::DataType, s::AbstractString)
for (i,guide) in enumerate(gplt.guides)
if isa(guide, t)
guide.label = s
gplt.guides[i] = t(s)
# guide.label = s
end
end
end
function updatePlotItems(::GadflyPackage, plt::Plot, d::Dict)
haskey(d, :title) && findGuideAndSet(plt, Gadfly.Guide.title, d[:title])
haskey(d, :xlabel) && findGuideAndSet(plt, Gadfly.Guide.xlabel, d[:xlabel])
haskey(d, :ylabel) && findGuideAndSet(plt, Gadfly.Guide.ylabel, d[:ylabel])
function updateGadflyGuides(gplt, d::Dict)
haskey(d, :title) && findGuideAndSet(gplt, Gadfly.Guide.title, d[:title])
haskey(d, :xlabel) && findGuideAndSet(gplt, Gadfly.Guide.xlabel, d[:xlabel])
haskey(d, :ylabel) && findGuideAndSet(gplt, Gadfly.Guide.ylabel, d[:ylabel])
end
function setGadflyDisplaySize(w,h)
Compose.set_default_graphic_size(w * Compose.px, h * Compose.px)
function updatePlotItems(plt::Plot{GadflyPackage}, d::Dict)
updateGadflyGuides(plt.o, d)
end
# function Base.display(::GadflyPackage, plt::Plot)
# # function Base.writemime(io::IO, ::MIME")
# setGadflyDisplaySize(plt.initargs[:size]...)
# display(plt.o)
# end
# ----------------------------------------------------------------
function Base.display(::PlotsDisplay, plt::Plot{GadflyPackage})
setGadflyDisplaySize(plt.initargs[:size]...)
display(plt.o)
# create the underlying object (each backend will do this differently)
function buildSubplotObject!(subplt::Subplot{GadflyPackage})
subplt.o = nothing
end
# -------------------------------
# ----------------------------------------------------------------
# function savepng(::GadflyPackage, plt::PlottingObject, fn::AbstractString;
# w = plt.initargs[:size][1] * Gadfly.px, # 6 * Gadfly.inch,
# h = plt.initargs[:size][2] * Gadfly.px) # 4 * Gadfly.inch)
# o = getGadflyContext(plt.plotter, plt)
# Gadfly.draw(Gadfly.PNG(fn, w, h), o)
# end
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{GadflyPackage})
# w = plt.initargs[:size][1] * Gadfly.px, # 6 * Gadfly.inch,
# h = plt.initargs[:size][2] * Gadfly.px) # 4 * Gadfly.inch)
gplt = getGadflyContext(plt.plotter, plt)
setGadflyDisplaySize(plt.initargs[:size]...)
Gadfly.draw(Gadfly.PNG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
end
# -------------------------------
getGadflyContext(::GadflyPackage, plt::Plot) = plt.o
getGadflyContext(::GadflyPackage, subplt::Subplot) = buildGadflySubplotContext(subplt)
@ -273,11 +255,21 @@ function buildGadflySubplotContext(subplt::Subplot)
Gadfly.vstack(rows...)
end
# create the underlying object (each backend will do this differently)
function buildSubplotObject!(subplt::Subplot{GadflyPackage})
subplt.o = nothing
function setGadflyDisplaySize(w,h)
Compose.set_default_graphic_size(w * Compose.px, h * Compose.px)
end
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{GadflyPackage})
gplt = getGadflyContext(plt.plotter, plt)
setGadflyDisplaySize(plt.initargs[:size]...)
Gadfly.draw(Gadfly.PNG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
end
function Base.display(::PlotsDisplay, plt::Plot{GadflyPackage})
setGadflyDisplaySize(plt.initargs[:size]...)
display(plt.o)
end
function Base.display(::PlotsDisplay, subplt::Subplot{GadflyPackage})
setGadflyDisplaySize(plt.initargs[:size]...)

View File

@ -43,36 +43,13 @@ function plot!(::ImmersePackage, plt::Plot; kw...)
plt
end
function Base.display(::ImmersePackage, plt::Plot)
fig, gplt = plt.o
if fig == nothing
fig = createImmerseFigure(plt.initargs)
plt.o = (fig, gplt)
end
# # display a new Figure object to force a redraw
# display(Immerse.Figure(fig.canvas, gplt))
Immerse.figure(fig.figno; displayfig = false)
display(gplt)
end
# -------------------------------
getGadflyContext(::ImmersePackage, plt::Plot) = plt.o[2]
getGadflyContext(::ImmersePackage, subplt::Subplot) = buildGadflySubplotContext(subplt)
function savepng(::ImmersePackage, plt::PlottingObject, fn::AbstractString;
w = 6 * Immerse.inch,
h = 4 * Immerse.inch)
gctx = getGadflyContext(plt.plotter, plt)
Gadfly.draw(Gadfly.PNG(fn, w, h), gctx)
nothing
function updatePlotItems(plt::Plot{ImmersePackage}, d::Dict)
updateGadflyGuides(plt.o[2], d)
end
# -------------------------------
# ----------------------------------------------------------------
function buildSubplotObject!(subplt::Subplot{ImmersePackage})
@ -119,15 +96,37 @@ function buildSubplotObject!(subplt::Subplot{ImmersePackage})
subplt.o = win
end
# ----------------------------------------------------------------
function Base.display(::ImmersePackage, subplt::Subplot)
getGadflyContext(::ImmersePackage, plt::Plot) = plt.o[2]
getGadflyContext(::ImmersePackage, subplt::Subplot) = buildGadflySubplotContext(subplt)
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{ImmersePackage})
gplt = getGadflyContext(plt.plotter, plt)
setGadflyDisplaySize(plt.initargs[:size]...)
Gadfly.draw(Gadfly.PNG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
end
function Base.display(::PlotsDisplay, plt::Plot{ImmersePackage})
fig, gplt = plt.o
if fig == nothing
fig = createImmerseFigure(plt.initargs)
plt.o = (fig, gplt)
end
Immerse.figure(fig.figno; displayfig = false)
display(gplt)
end
function Base.display(::PlotsDisplay, subplt::Subplot{ImmersePackage})
# display the plots by creating a fresh Immerse.Figure object from the GtkCanvas and Gadfly.Plot
for plt in subplt.plts
fig, gplt = plt.o
Immerse.figure(fig.figno; displayfig = false)
display(gplt)
# display(Immerse.Figure(fig.canvas, gplt))
end
# o is the window... show it

View File

@ -107,7 +107,7 @@ function updateAxisColors(ax, fgcolor)
ax[:title][:set_color](fgcolor)
end
makePlotCurrent(plt::Plot) = PyPlot.figure(plt.o[1].o[:number])
makePyPlotCurrent(plt::Plot) = PyPlot.figure(plt.o[1].o[:number])
# ------------------------------------------------------------------
@ -139,7 +139,7 @@ function plot!(pkg::PyPlotPackage, plt::Plot; kw...)
fig, num = plt.o
# PyPlot.figure(num) # makes this current
makePlotCurrent(plt)
makePyPlotCurrent(plt)
if !(d[:linetype] in supportedTypes(pkg))
error("linetype $(d[:linetype]) is unsupported in PyPlot. Choose from: $(supportedTypes(pkg))")
@ -217,16 +217,36 @@ function plot!(pkg::PyPlotPackage, plt::Plot; kw...)
end
function updatePlotItems(::PyPlotPackage, plt::Plot, d::Dict)
makePlotCurrent(plt)
function updatePlotItems(plt::Plot{PyPlotPackage}, d::Dict)
makePyPlotCurrent(plt)
haskey(d, :title) && PyPlot.title(d[:title])
haskey(d, :xlabel) && PyPlot.xlabel(d[:xlabel])
haskey(d, :ylabel) && PyPlot.ylabel(d[:ylabel])
end
# -------------------------------
# function savepng(::PyPlotPackage, plt::PlottingObject, fn::AbstractString, args...)
# fig, num = plt.o
# addPyPlotLegend(plt)
# f = open(fn, "w")
# writemime(f, "image/png", fig)
# close(f)
# end
# -----------------------------------------------------------------
# create the underlying object (each backend will do this differently)
function buildSubplotObject!(subplt::Subplot{PyPlotPackage})
error("unsupported")
end
# -----------------------------------------------------------------
function addPyPlotLegend(plt::Plot)
# add a legend?
# try
if plt.initargs[:legend]
# gotta do this to ensure both axes are included
args = filter(x -> !(x[:linetype] in (:hist,:hexbin,:heatmap)), plt.seriesargs)
@ -234,40 +254,27 @@ function addPyPlotLegend(plt::Plot)
PyPlot.legend([d[:serieshandle] for d in args], [d[:label] for d in args], loc="best")
end
end
# catch ex
# warn("Error adding PyPlot legend: ", ex)
# end
end
function Base.display(::PyPlotPackage, plt::Plot)
function Base.writemime(io::IO, m::MIME"image/png", plt::PlottingObject{PyPlotPackage})
fig, num = plt.o
addPyPlotLegend(plt)
writemime(io, m, fig)
end
function Base.display(::PlotsDisplay, plt::Plot{PyPlotPackage})
fig, num = plt.o
# PyPlot.figure(num) # makes this current
makePlotCurrent(plt)
makePyPlotCurrent(plt)
addPyPlotLegend(plt)
ax = fig.o[:axes][1]
updateAxisColors(ax, getPyPlotColor(plt.initargs[:foreground_color]))
display(fig)
end
# -------------------------------
function savepng(::PyPlotPackage, plt::PlottingObject, fn::AbstractString, args...)
fig, num = plt.o
addPyPlotLegend(plt)
f = open(fn, "w")
writemime(f, "image/png", fig)
close(f)
end
# -------------------------------
# create the underlying object (each backend will do this differently)
function buildSubplotObject!(subplt::Subplot{PyPlotPackage})
error("unsupported")
end
function Base.display(::PyPlotPackage, subplt::Subplot)
function Base.display(::PlotsDisplay, subplt::Subplot{PyPlotPackage})
display(subplt.o)
end

View File

@ -57,20 +57,15 @@ function plot!(::QwtPackage, plt::Plot; kw...)
plt
end
function updatePlotItems(::QwtPackage, plt::Plot, d::Dict)
function updatePlotItems(plt::Plot{QwtPackage}, d::Dict)
haskey(d, :title) && Qwt.title(plt.o, d[:title])
haskey(d, :xlabel) && Qwt.xlabel(plt.o, d[:xlabel])
haskey(d, :ylabel) && Qwt.ylabel(plt.o, d[:ylabel])
end
function Base.display(::QwtPackage, plt::Plot)
Qwt.refresh(plt.o)
Qwt.showwidget(plt.o)
end
# -------------------------------
savepng(::QwtPackage, plt::PlottingObject, fn::AbstractString, args...) = Qwt.savepng(plt.o, fn)
# savepng(::QwtPackage, plt::PlottingObject, fn::AbstractString, args...) = Qwt.savepng(plt.o, fn)
# -------------------------------
@ -87,8 +82,20 @@ function buildSubplotObject!(subplt::Subplot{QwtPackage})
Qwt.moveToLastScreen(subplt.o) # hack so it goes to my center monitor... sorry
end
# ----------------------------------------------------------------
function Base.display(::QwtPackage, subplt::Subplot)
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{QwtPackage})
Qwt.savepng(plt.o, "/tmp/dfskjdhfkh.png")
write(io, readall("/tmp/dfskjdhfkh.png"))
end
function Base.display(::PlotsDisplay, plt::Plot{QwtPackage})
Qwt.refresh(plt.o)
Qwt.showwidget(plt.o)
end
function Base.display(::PlotsDisplay, subplt::Subplot{QwtPackage})
for plt in subplt.plts
Qwt.refresh(plt.o)
end

View File

@ -34,42 +34,27 @@ function plot!(::[PkgName]Package, plt::Plot; kw...)
plt
end
# ----------------------------------------------------------------
# TODO: override this to update plot items (title, xlabel, etc) after creation
function updatePlotItems(plt::Plot{[PkgName]Package}, d::Dict)
end
# function Base.display(::[PkgName]Package, plt::Plot)
# # TODO: display/show the plot
# end
function Base.display(::PlotsDisplay, plt::Plot{[PkgName]Package})
# TODO: display/show the plot
end
# -------------------------------
# function savepng(::[PkgName]Package, plt::PlottingObject, fn::AbstractString; kw...)
# # TODO: save a PNG of the underlying plot/subplot object
# end
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{[PkgName]Package})
# TODO: write a png to io
end
# -------------------------------
# ----------------------------------------------------------------
function buildSubplotObject!(subplt::Subplot{[PkgName]Package})
# TODO: build the underlying Subplot object. this is where you might layout the panes within a GUI window, for example
end
# ----------------------------------------------------------------
# function Base.display(::[PkgName]Package, subplt::Subplot)
# # TODO: display/show the Subplot object
# end
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{[PkgName]Package})
# TODO: write a png to io
end
function Base.display(::PlotsDisplay, plt::Plot{[PkgName]Package})
# TODO: display/show the plot
end
function Base.display(::PlotsDisplay, plt::Subplot{[PkgName]Package})
# TODO: display/show the subplot

View File

@ -92,6 +92,10 @@ function addUnicodeSeries!(o, d::Dict, addlegend::Bool)
end
function handlePlotColors(::UnicodePlotsPackage, d::Dict)
# TODO: something special for unicodeplots, since it doesn't take kindly to people messing with its color palette
end
# -------------------------------
@ -117,18 +121,24 @@ function plot!(::UnicodePlotsPackage, plt::Plot; kw...)
plt
end
function Base.display(::UnicodePlotsPackage, plt::Plot)
rebuildUnicodePlot!(plt)
show(plt.o)
function updatePlotItems(plt::Plot{UnicodePlotsPackage}, d::Dict)
for k in (:title, :xlabel, :ylabel)
if haskey(d, k)
plt.initargs[k] = d[k]
end
end
end
# -------------------------------
function savepng(::UnicodePlotsPackage, plt::PlottingObject, fn::AbstractString, args...)
# function savepng(::UnicodePlotsPackage, plt::PlottingObject, fn::AbstractString, args...)
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{UnicodePlotsPackage})
# make some whitespace and show the plot
println("\n\n\n\n\n\n")
display(plt)
gui(plt)
@osx_only begin
# BEGIN HACK
@ -156,14 +166,21 @@ end
# we don't do very much for subplots... just stack them vertically
function buildSubplotObject!(::UnicodePlotsPackage, subplt::Subplot)
function buildSubplotObject!(subplt::Subplot{UnicodePlotsPackage})
nothing
end
function Base.display(::UnicodePlotsPackage, subplt::Subplot)
function Base.display(::PlotsDisplay, plt::Plot{UnicodePlotsPackage})
rebuildUnicodePlot!(plt)
show(plt.o)
end
function Base.display(::PlotsDisplay, subplt::Subplot{UnicodePlotsPackage})
for plt in subplt.plts
display(UnicodePlotsPackage(), plt)
gui(plt)
end
end

View File

@ -33,8 +33,8 @@ const winston_marker = Dict(:none=>".",
supportedArgs(::WinstonPackage) = setdiff(_allArgs, [:heatmap_c, :fillto, :pos, :markercolor, :background_color])
supportedAxes(::WinstonPackage) = [:auto, :left]
supportedTypes(::WinstonPackage) = [:none, :line, :path, :sticks, :scatter, :hist, :bar]
supportedStyles(::WinstonPackage) = intersect(_allStyles, collect(keys(winston_linestyle))) # [:auto, :solid, :dash, :dot, :dashdot]
supportedMarkers(::WinstonPackage) = intersect(_allMarkers, collect(keys(winston_marker))) # [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1]
supportedStyles(::WinstonPackage) = intersect(_allStyles, collect(keys(winston_linestyle)))
supportedMarkers(::WinstonPackage) = intersect(_allMarkers, collect(keys(winston_marker)))
subplotSupported(::WinstonPackage) = false
# ---------------------------------------------------------------------------
@ -51,42 +51,9 @@ subplotSupported(::WinstonPackage) = false
function plot(pkg::WinstonPackage; kw...)
d = Dict(kw)
# bgcolor
# create a new window
# the call to figure does a few things here:
# get a new unique id
# create a new GtkWindow (or Tk?)
# w,h = d[:size]
# canvas = Gtk.GtkCanvasLeaf()
# window = Gtk.GtkWindowLeaf(canvas, d[:windowtitle], w, h)
# figidx = Winston.figure(; name = d[:windowtitle], width = w, height = h)
# # skip the current fig stuff... just grab the fig directly
# fig = Winston._display.figs[figidx]
# overwrite the placeholder FramedPlot with our own
# fig.plot = Winston.FramedPlot(title = d[:title], xlabel = d[:xlabel], ylabel = d[:ylabel])
wplt = Winston.FramedPlot(title = d[:title], xlabel = d[:xlabel], ylabel = d[:ylabel])
# # using the figure index returned from Winston.figure, make this plot current and get the
# # Figure object (fields: window::GtkWindow and plot::FramedPlot)
# Winston.switchfig(Winston._display, figidx)
# fig = Winston.curfig(Winston._display)
# Winston._pwinston = fig.plot
# Winston.setattr(fig.plot, "xlabel", d[:xlabel])
# Winston.setattr(fig.plot, "ylabel", d[:ylabel])
# Winston.setattr(fig.plot, "title", d[:title])
Plot(wplt, pkg, 0, d, Dict[])
# Plot((window, canvas, wplt), pkg, 0, d, Dict[])
# Plot((fig, figidx), pkg, 0, d, Dict[])
end
copy_remove(d::Dict, s::Symbol) = delete!(copy(d), s)
@ -203,14 +170,48 @@ function plot!(::WinstonPackage, plt::Plot; kw...)
end
function updatePlotItems(plt::Plot{WinstonPackage}, d::Dict)
window, canvas, wplt = getWinstonItems(plt)
for k in (:xlabel, :ylabel, :title)
if haskey(d, k)
Winston.setattr(wplt, string(k), d[k])
end
end
end
# -------------------------------
# function savepng(::WinstonPackage, plt::PlottingObject, fn::AbstractString; kw...)
# f = open(fn, "w")
# window, canvas, wplt = getWinstonItems(plt)
# addWinstonLegend(plt, wplt)
# writemime(f, "image/png", wplt)
# close(f)
# end
# -------------------------------
function buildSubplotObject!(subplt::Subplot{WinstonPackage})
# TODO: build the underlying Subplot object. this is where you might layout the panes within a GUI window, for example
end
# ----------------------------------------------------------------
function addWinstonLegend(plt::Plot, wplt)
Winston.legend(wplt, [sd[:label] for sd in plt.seriesargs])
end
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{WinstonPackage})
window, canvas, wplt = getWinstonItems(plt)
addWinstonLegend(plt, wplt)
writemime(io, "image/png", wplt)
end
function Base.display(::WinstonPackage, plt::Plot)
# recreate the legend
# fig, figidx = plt.o
function Base.display(::PlotsDisplay, plt::Plot{WinstonPackage})
window, canvas, wplt = getWinstonItems(plt)
@ -219,45 +220,16 @@ function Base.display(::WinstonPackage, plt::Plot)
w,h = plt.initargs[:size]
canvas = Gtk.GtkCanvasLeaf()
window = Gtk.GtkWindowLeaf(canvas, plt.initargs[:windowtitle], w, h)
# wplt = plt.o
plt.o = (window, canvas, wplt)
# else
# window, canvas, wplt = plt.o
end
addWinstonLegend(plt, wplt)
Winston.display(canvas, wplt)
Gtk.showall(window)
# # display the Figure
# display(fig)
# display(plt.o.window)
# # show it
# Winston.display(plt.o.plot)
end
# -------------------------------
function savepng(::WinstonPackage, plt::PlottingObject, fn::AbstractString; kw...)
f = open(fn, "w")
window, canvas, wplt = getWinstonItems(plt)
addWinstonLegend(plt, wplt)
writemime(f, "image/png", wplt)
close(f)
end
# -------------------------------
function buildSubplotObject!(::WinstonPackage, subplt::Subplot)
# TODO: build the underlying Subplot object. this is where you might layout the panes within a GUI window, for example
end
function Base.display(::WinstonPackage, subplt::Subplot)
function Base.display(::PlotsDisplay, subplt::Subplot{WinstonPackage})
# TODO: display/show the Subplot object
end

View File

@ -136,7 +136,8 @@ end
# TODO: try to use the algorithms from https://github.com/timothyrenner/ColorBrewer.jl
# TODO: allow the setting of the algorithm, either by passing a symbol (:colordiff, :fixed, etc) or a function?
function getBackgroundRGBColor(c, d::Dict)
# function getBackgroundRGBColor(c, d::Dict)
function handlePlotColors(::PlottingPackage, d::Dict)
if :background_color in supportedArgs()
bgcolor = convertColor(d[:background_color])
else
@ -159,7 +160,8 @@ function getBackgroundRGBColor(c, d::Dict)
d[:foreground_color] = convertColor(d[:foreground_color])
end
bgcolor
# bgcolor
d[:background_color] = bgcolor
end
# converts a symbol or string into a colorant (Colors.RGB), and assigns a color automatically
@ -171,8 +173,8 @@ function getSeriesRGBColor(c, d::Dict, n::Int)
c = convertColor(c)
end
# should be a RGB now... either it was passed in, generated automatically, or created from a string
@assert isa(c, Colorant)
# # should be a RGB now... either it was passed in, generated automatically, or created from a string
# @assert isa(c, Colorant)
# return the RGB
c

View File

@ -93,7 +93,7 @@ function plot!(plt::Plot, args...; kw...)
plot!(plt.plotter, plt; d...)
end
updatePlotItems(plt.plotter, plt, d)
updatePlotItems(plt, d)
currentPlot!(plt)
# NOTE: lets ignore the show param and effectively use the semicolon at the end of the REPL statement