fixed colors from subplot changes; fix imgcmp; new refimgs
This commit is contained in:
parent
ef20c1d684
commit
3ffec5aed9
@ -83,22 +83,6 @@ end
|
|||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
convertColor(c::@compat(Union{AbstractString, Symbol})) = parse(Colorant, string(c))
|
|
||||||
convertColor(c::Colorant) = c
|
|
||||||
convertColor(cvec::AbstractVector) = map(convertColor, cvec)
|
|
||||||
|
|
||||||
function convertColor(c, α::Real)
|
|
||||||
c = convertColor(c)
|
|
||||||
RGBA(c, α)
|
|
||||||
end
|
|
||||||
convertColor(cs::AVec, α::Real) = map(c -> convertColor(c, α), cs)
|
|
||||||
convertColor(c, α::Void) = convertColor(c)
|
|
||||||
|
|
||||||
# backup... try to convert
|
|
||||||
getColor(c) = convertColor(c)
|
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
|
||||||
|
|
||||||
abstract ColorScheme
|
abstract ColorScheme
|
||||||
|
|
||||||
getColor(scheme::ColorScheme) = getColor(scheme, 1)
|
getColor(scheme::ColorScheme) = getColor(scheme, 1)
|
||||||
@ -118,6 +102,23 @@ colorscheme(c::Colorant; kw...) = ColorWrapper(c; kw...)
|
|||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
convertColor(c::@compat(Union{AbstractString, Symbol})) = parse(Colorant, string(c))
|
||||||
|
convertColor(c::Colorant) = c
|
||||||
|
convertColor(cvec::AbstractVector) = map(convertColor, cvec)
|
||||||
|
convertColor(c::ColorScheme) = c
|
||||||
|
|
||||||
|
function convertColor(c, α::Real)
|
||||||
|
c = convertColor(c)
|
||||||
|
RGBA(c, α)
|
||||||
|
end
|
||||||
|
convertColor(cs::AVec, α::Real) = map(c -> convertColor(c, α), cs)
|
||||||
|
convertColor(c, α::Void) = convertColor(c)
|
||||||
|
|
||||||
|
# backup... try to convert
|
||||||
|
getColor(c) = convertColor(c)
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
const _rainbowColors = [colorant"blue", colorant"purple", colorant"green", colorant"orange", colorant"red"]
|
const _rainbowColors = [colorant"blue", colorant"purple", colorant"green", colorant"orange", colorant"red"]
|
||||||
const _testColors = [colorant"darkblue", colorant"blueviolet", colorant"darkcyan",colorant"green",
|
const _testColors = [colorant"darkblue", colorant"blueviolet", colorant"darkcyan",colorant"green",
|
||||||
darken(colorant"yellow",0.3), colorant"orange", darken(colorant"red",0.2)]
|
darken(colorant"yellow",0.3), colorant"orange", darken(colorant"red",0.2)]
|
||||||
@ -336,7 +337,7 @@ function generate_colorgradient(bgcolor = colorant"white";
|
|||||||
gradient_from_list(colors)
|
gradient_from_list(colors)
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_color_palette(palette, bgcolor::Colorant, numcolors::Integer)
|
function get_color_palette(palette, bgcolor::Union{Colorant,ColorWrapper}, numcolors::Integer)
|
||||||
grad = if palette == :auto
|
grad = if palette == :auto
|
||||||
generate_colorgradient(bgcolor)
|
generate_colorgradient(bgcolor)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# # include this first to help with crashing??
|
# include this first to help with crashing??
|
||||||
# using Gtk
|
using Gtk
|
||||||
|
|
||||||
# don't let pyplot use a gui... it'll crash
|
# don't let pyplot use a gui... it'll crash
|
||||||
# note: Agg will set gui -> :none in PyPlot
|
# note: Agg will set gui -> :none in PyPlot
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
BIN
test/refimg/pyplot/ref21.png
Normal file
BIN
test/refimg/pyplot/ref21.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Loading…
x
Reference in New Issue
Block a user