Added horizontal/vertical linetype
This commit is contained in:
parent
baf33609af
commit
054a99ca38
@ -180,8 +180,18 @@ function gr_display(plt::Plot{GRPackage})
|
|||||||
GR.setfillintstyle(GR.INTSTYLE_HOLLOW)
|
GR.setfillintstyle(GR.INTSTYLE_HOLLOW)
|
||||||
GR.fillrect(x[i-1], x[i], ymin, y[i])
|
GR.fillrect(x[i-1], x[i], ymin, y[i])
|
||||||
end
|
end
|
||||||
|
elseif p[:linetype] in [:hline, :vline]
|
||||||
|
haskey(p, :linecolor) && GR.setlinecolorind(gr_getcolorind(p[:linecolor]))
|
||||||
|
haskey(p, :linestyle) && GR.setlinetype(gr_linetype[p[:linestyle]])
|
||||||
|
for xy in p[:y]
|
||||||
|
if p[:linetype] == :hline
|
||||||
|
GR.polyline([xmin, xmax], [xy, xy])
|
||||||
|
else
|
||||||
|
GR.polyline([xy, xy], [ymin, ymax])
|
||||||
|
end
|
||||||
|
end
|
||||||
elseif p[:linetype] in [:line, :steppre, :steppost, :sticks,
|
elseif p[:linetype] in [:line, :steppre, :steppost, :sticks,
|
||||||
:heatmap, :hexbin, :density, :bar, :hline, :vline,
|
:heatmap, :hexbin, :density, :bar,
|
||||||
:contour, :path3d, :scatter3d, :surface,
|
:contour, :path3d, :scatter3d, :surface,
|
||||||
:wireframe, :ohlc, :pie]
|
:wireframe, :ohlc, :pie]
|
||||||
println("TODO: add support for linetype $(p[:linetype])")
|
println("TODO: add support for linetype $(p[:linetype])")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user