attempted colormap fix for gr
This commit is contained in:
parent
7bce4a963e
commit
925243969c
@ -428,12 +428,20 @@ function gr_display(plt::Plot{GRBackend}, clear=true, update=true,
|
|||||||
for p in plt.seriesargs
|
for p in plt.seriesargs
|
||||||
lt = p[:linetype]
|
lt = p[:linetype]
|
||||||
if lt in (:hist2d, :hexbin, :contour, :surface, :wireframe, :heatmap)
|
if lt in (:hist2d, :hexbin, :contour, :surface, :wireframe, :heatmap)
|
||||||
if haskey(d, :color_palette)
|
if isa(p[:fillcolor], ColorGradient)
|
||||||
ci = 1000
|
# TODO: this still isn't right... need to do something like in PyPlot for skewed gradients
|
||||||
for cv in d[:color_palette]
|
# cv = p[:fillcolor].colors
|
||||||
GR.setcolorrep(ci, cv.r, cv.g, cv.b)
|
for (i,cz) in enumerate(linspace(0,1,256))
|
||||||
ci += 1
|
# c = cv[mod1(i,length(cv))]
|
||||||
end
|
c = getColorZ(p[:fillcolor], cz)
|
||||||
|
GR.setcolorrep(999+i, red(c), green(c), blue(c))
|
||||||
|
end
|
||||||
|
# if haskey(d, :color_palette)
|
||||||
|
# ci = 1000
|
||||||
|
# for cv in d[:color_palette]
|
||||||
|
# GR.setcolorrep(ci, cv.r, cv.g, cv.b)
|
||||||
|
# ci += 1
|
||||||
|
# end
|
||||||
else
|
else
|
||||||
GR.setcolormap(GR.COLORMAP_COOLWARM)
|
GR.setcolormap(GR.COLORMAP_COOLWARM)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user