pyplot hist in legend fix; closes #254
This commit is contained in:
parent
2c2218bcb9
commit
abbd8635dd
@ -605,7 +605,7 @@ function _series_added(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
weights = d[:weights],
|
weights = d[:weights],
|
||||||
orientation = (isvertical(d) ? "vertical" : "horizontal"),
|
orientation = (isvertical(d) ? "vertical" : "horizontal"),
|
||||||
histtype = (d[:bar_position] == :stack ? "barstacked" : "bar")
|
histtype = (d[:bar_position] == :stack ? "barstacked" : "bar")
|
||||||
)[1]
|
)[3]
|
||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1124,10 +1124,14 @@ function addPyPlotLegend(plt::Plot, sp::Subplot, ax)
|
|||||||
if get_subplot(series) === sp &&
|
if get_subplot(series) === sp &&
|
||||||
series.d[:label] != "" &&
|
series.d[:label] != "" &&
|
||||||
!(series.d[:seriestype] in (
|
!(series.d[:seriestype] in (
|
||||||
:hist,:density,:hexbin,:hist2d,:hline,:vline,
|
:hexbin,:hist2d,:hline,:vline,
|
||||||
:contour,:contour3d,:surface,:wireframe,
|
:contour,:contour3d,:surface,:wireframe,
|
||||||
:heatmap,:path3d,:scatter3d, :pie, :image))
|
:heatmap,:path3d,:scatter3d, :pie, :image))
|
||||||
push!(handles, series.d[:serieshandle][1])
|
push!(handles, if series.d[:seriestype] == :hist
|
||||||
|
PyPlot.plt[:Line2D]((0,1),(0,0), color=pyfillcolor(series.d), linewidth=4)
|
||||||
|
else
|
||||||
|
series.d[:serieshandle][1]
|
||||||
|
end)
|
||||||
push!(labels, series.d[:label])
|
push!(labels, series.d[:label])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user