Compare commits

..

7 Commits

Author SHA1 Message Date
github-actions[bot] 6d3604ed80 Update precompile_*.jl file (#3010)
Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>
2020-09-27 20:42:16 +02:00
Simon Christ 574f93208f Merge branch 'bbs/NaNHeatmap' of https://github.com/JuliaPlots/Plots.jl into bbs/NaNHeatmap 2020-09-26 21:32:06 +02:00
Simon Christ 3b082f88d1 add a dimensionalty check 2020-09-26 21:31:52 +02:00
github-actions[bot] 95f91e18f9 Update precompile_*.jl file (#3008)
Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>
2020-09-26 21:06:29 +02:00
Simon Christ 1be0b76940 remove show 2020-09-25 23:19:15 +02:00
Simon Christ 2b4cd34377 fix histogram2D 2020-09-25 23:14:51 +02:00
Simon Christ ab820a5b76 fix NaNHeatmaps 2020-09-25 22:57:27 +02:00
7 changed files with 15 additions and 43 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name = "Plots"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
author = ["Tom Breloff (@tbreloff)"]
version = "1.6.7"
version = "1.6.5"
[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
+3 -3
View File
@@ -367,10 +367,10 @@ is_marker_supported(::GRBackend, shape::Shape) = true
function _initialize_backend(pkg::PlotlyBackend)
try
@eval Main begin
import PlotlyBase
import ORCA
end
catch
@info "For saving to png with the Plotly backend PlotlyBase has to be installed."
@info "For saving to png with the Plotly backend ORCA has to be installed."
end
end
@@ -488,7 +488,7 @@ const _pgfplots_scale = [:identity, :ln, :log2, :log10]
function _initialize_backend(pkg::PlotlyJSBackend)
@eval Main begin
import PlotlyJS
import PlotlyJS, ORCA
export PlotlyJS
end
end
-2
View File
@@ -1332,8 +1332,6 @@ function gr_label_ticks(sp, letter, ticks)
end
end
function gr_label_ticks(sp, letter, ticks::Nothing) end
function gr_label_ticks_3d(sp, letter, ticks)
near_letter = letter in (:x, :z) ? :y : :x
far_letter = letter in (:x, :y) ? :z : :x
@@ -1,14 +1,14 @@
function plotlybase_syncplot(plt::Plot)
plt.o = PlotlyBase.Plot()
traces = PlotlyBase.GenericTrace[]
plt.o = ORCA.PlotlyBase.Plot()
traces = ORCA.PlotlyBase.GenericTrace[]
for series_dict in plotly_series(plt)
plotly_type = pop!(series_dict, :type)
push!(traces, PlotlyBase.GenericTrace(plotly_type; series_dict...))
push!(traces, ORCA.PlotlyBase.GenericTrace(plotly_type; series_dict...))
end
PlotlyBase.addtraces!(plt.o, traces...)
ORCA.PlotlyBase.addtraces!(plt.o, traces...)
layout = plotly_layout(plt)
w, h = plt[:size]
PlotlyBase.relayout!(plt.o, layout, width = w, height = h)
ORCA.PlotlyBase.relayout!(plt.o, layout, width = w, height = h)
return plt.o
end
@@ -19,5 +19,5 @@ for (mime, fmt) in (
"image/eps" => "eps",
)
@eval _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) =
PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt)
ORCA.PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt)
end
+2 -1
View File
@@ -788,7 +788,8 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
else
# if fillrange is a tuple with upper and lower limit, plotattributes_out_fillrange
# is the series that will do the filling
plotattributes_out_fillrange[:x], plotattributes_out_fillrange[:y] = concatenate_fillrange(x[rng], series[:fillrange])
fillrng = Tuple(series[:fillrange][i][rng] for i in 1:2)
plotattributes_out_fillrange[:x], plotattributes_out_fillrange[:y] = concatenate_fillrange(x[rng], fillrng)
plotattributes_out_fillrange[:line][:width] = 0
delete!(plotattributes_out, :fill)
delete!(plotattributes_out, :fillcolor)
+2 -2
View File
@@ -41,8 +41,8 @@ function __init__()
include(fn)
end
@require PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" begin
fn = joinpath(@__DIR__, "backends", "plotlybase.jl")
@require ORCA = "47be7bcc-f1a6-5447-8b36-7eeeff7534fd" begin
fn = joinpath(@__DIR__, "backends", "orca.jl")
include(fn)
end
+1 -28
View File
@@ -262,22 +262,13 @@ end
end
end
newx, newy = zeros(3n), zeros(3n)
newz = z!== nothing ? zeros(3n) : nothing
for i = 1:n
rng = (3i - 2):(3i)
newx[rng] = [x[i], x[i], NaN]
if z !== nothing
newy[rng] = [y[i], y[i], NaN]
newz[rng] = [_cycle(fr, i), z[i], NaN]
else
newy[rng] = [_cycle(fr, i), y[i], NaN]
end
newy[rng] = [_cycle(fr, i), y[i], NaN]
end
x := newx
y := newy
if z !== nothing
z := newz
end
fillrange := nothing
seriestype := :path
@@ -287,9 +278,6 @@ end
seriestype := :scatter
x := x
y := y
if z !== nothing
z := z
end
label := ""
primary := false
()
@@ -1101,12 +1089,6 @@ function error_coords(errorbar, errordata, otherdata...)
return (ed, od...)
end
# clamp non-NaN values in an array to Base.eps(Float64) for log-scale plots
function clamp_to_eps!(ary)
replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary)
nothing
end
# we will create a series of path segments, where each point represents one
# side of an errorbar
@@ -1120,9 +1102,6 @@ end
plotattributes[:x], plotattributes[:y], plotattributes[:z] =
error_coords(xerr, x, y, z)
end
if :xscale keys(plotattributes) && plotattributes[:xscale] == :log10
clamp_to_eps!(plotattributes[:x])
end
()
end
@deps xerror path
@@ -1137,9 +1116,6 @@ end
plotattributes[:y], plotattributes[:x], plotattributes[:z] =
error_coords(yerr, y, x, z)
end
if :yscale keys(plotattributes) && plotattributes[:yscale] == :log10
clamp_to_eps!(plotattributes[:y])
end
()
end
@deps yerror path
@@ -1152,9 +1128,6 @@ end
plotattributes[:z], plotattributes[:x], plotattributes[:y] =
error_coords(zerr, z, x, y)
end
if :zscale keys(plotattributes) && plotattributes[:zscale] == :log10
clamp_to_eps!(plotattributes[:z])
end
()
end
@deps zerror path