Merge pull request #1915 from o01eg/fix-1904

Fix bar plot for unicode plots backend
This commit is contained in:
Michael Krabbe Borregaard 2019-02-09 13:18:05 +01:00 committed by GitHub
commit a594878860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -116,7 +116,7 @@ function addUnicodeSeries!(o, plotattributes::KW, addlegend::Bool, xlim, ylim)
x, y = if st == :straightline
straightline_data(plotattributes)
elseif st == :shape
shape_data(series)
shape_data(plotattributes)
else
[collect(float(plotattributes[s])) for s in (:x, :y)]
end

View File

@ -33,7 +33,12 @@ end
@test backend() == Plots.UnicodePlotsBackend()
# lets just make sure it runs without error
@test isa(plot(rand(10)), Plots.Plot) == true
p = plot(rand(10))
@test isa(p, Plots.Plot) == true
@test isa(display(p), Nothing) == true
p = bar(randn(10))
@test isa(p, Plots.Plot) == true
@test isa(display(p), Nothing) == true
end
# The plotlyjs testimages return a connection error on travis: