rely on recipe for histogram2d
This commit is contained in:
parent
8cb32b1f14
commit
e2a4b0eb30
@ -708,7 +708,7 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
||||
const _pgfplotsx_seriestype =
|
||||
[:path, :scatter, :straightline,
|
||||
:path3d, :scatter3d, :surface, :wireframe,
|
||||
:heatmap, :contour, :contour3d, :histogram2d,
|
||||
:heatmap, :contour, :contour3d,
|
||||
:shape,
|
||||
:steppre, :stepmid, :steppost, :ysticks, :xsticks]
|
||||
const _pgfplotsx_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Contour: Contour
|
||||
# PGFPlotsX.print_tex(io::IO, data::ColorGradient) = write(io, pgfx_colormap(data))
|
||||
Base.@kwdef mutable struct PGFPlotsXPlot
|
||||
is_created::Bool = false
|
||||
was_shown::Bool = false
|
||||
@ -250,7 +249,8 @@ end
|
||||
else
|
||||
opt[:x], opt[:y]
|
||||
end
|
||||
seg_args = if st in (:contour, :contour3d, :heatmap, :filledcontour)
|
||||
seg_args = if st in (:contour, :contour3d, :filledcontour)
|
||||
|
||||
args
|
||||
else
|
||||
(arg[rng] for arg in args)
|
||||
@ -278,10 +278,12 @@ end
|
||||
function pgfx_series_coordinates!(st_val::Val{:heatmap}, segment_opt, opt, args)
|
||||
push!(segment_opt,
|
||||
"surf" => nothing,
|
||||
"mesh/rows" => length(opt[:x])
|
||||
"mesh/rows" => length(opt[:x]),
|
||||
"mesh/cols" => length(opt[:y])
|
||||
)
|
||||
return PGFPlotsX.Table(args...)
|
||||
end
|
||||
|
||||
function pgfx_series_coordinates!(st_val::Val{:stepre}, segment_opt, opt, args)
|
||||
push!( segment_opt, "const plot mark right" => nothing )
|
||||
return PGFPlotsX.Coordinates(args...)
|
||||
@ -590,14 +592,11 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
||||
end
|
||||
|
||||
# limits
|
||||
# TODO: support zlims
|
||||
if letter != :z
|
||||
lims = ispolar(sp) && letter == :x ? rad2deg.(axis_limits(sp, :x)) : axis_limits(sp, letter)
|
||||
push!( opt,
|
||||
string(letter,:min) => lims[1],
|
||||
string(letter,:max) => lims[2]
|
||||
)
|
||||
end
|
||||
|
||||
if !(axis[:ticks] in (nothing, false, :none, :native)) && framestyle != :none
|
||||
ticks = get_ticks(sp, axis)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user