filled contour, histogram2d
This commit is contained in:
parent
20f6d559c3
commit
8553bef132
@ -707,7 +707,7 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
||||
])
|
||||
const _pgfplotsx_seriestype =
|
||||
[:path, :scatter, :straightline,
|
||||
:path3d, :scatter3d, :surface, :wireframe, :volume,
|
||||
:path3d, :scatter3d, :surface, :wireframe,
|
||||
:heatmap, :contour, :histogram2d,
|
||||
:shape,
|
||||
:steppre, :stepmid, :steppost, :ysticks, :xsticks]
|
||||
|
||||
@ -37,7 +37,6 @@ function Base.push!(pgfx_plot::PGFPlotsXPlot, item)
|
||||
end
|
||||
|
||||
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
# TODO: annotations! does not trigger _series_added ...
|
||||
if !pgfx_plot.is_created
|
||||
cols, rows = size(plt.layout.grid)
|
||||
the_plot = PGFPlotsX.TikzPicture()
|
||||
@ -126,7 +125,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
push!( axis_opt, "view" => (azim, elev) )
|
||||
end
|
||||
axisf = if sp[:projection] == :polar
|
||||
# TODO: this errors for some reason
|
||||
# push!(axis_opt, "xmin" => 90)
|
||||
# push!(axis_opt, "xmax" => 450)
|
||||
PGFPlotsX.PolarAxis
|
||||
@ -194,14 +192,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
"labels" => opt[:contour_labels],
|
||||
)
|
||||
)
|
||||
else
|
||||
notimpl()
|
||||
push!(series_opt,
|
||||
"contour filled" => PGFPlotsX.Options(
|
||||
# "levels" => opt[:levels],
|
||||
# "labels" => opt[:contour_labels],
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
coordinates = pgfx_series_coordinates!( sp, st, segment_opt, opt, rng )
|
||||
@ -390,7 +380,6 @@ const _pgfx_annotation_halign = KW(
|
||||
)
|
||||
## --------------------------------------------------------------------------------------
|
||||
# Generates a colormap for pgfplots based on a ColorGradient
|
||||
# TODO: maybe obsolete
|
||||
pgfx_arrow(::Nothing) = "every arrow/.append style={-}"
|
||||
function pgfx_arrow( arr::Arrow )
|
||||
components = String[]
|
||||
|
||||
@ -70,11 +70,9 @@ end
|
||||
x = 0.1:0.2:0.9
|
||||
y = 0.7 * rand(5) .+ 0.15
|
||||
plot(x, y, line=(3, :dash, :lightblue), marker=(Shape(verts), 30, RGBA(0, 0, 0, 0.2)), bg=:pink, fg=:darkblue, xlim=(0, 1), ylim=(0, 1), leg=false)
|
||||
# TODO: draw those polygons
|
||||
end # testset
|
||||
@testset "Histogram 2D" begin
|
||||
histogram2d(randn(10000), randn(10000), nbins=20)
|
||||
# TODO: should work, when heatmaps works?
|
||||
end # testset
|
||||
@testset "Heatmap-like" begin
|
||||
xs = [string("x", i) for i = 1:10]
|
||||
@ -102,7 +100,6 @@ end
|
||||
p2 = contour(x, y, Z)
|
||||
p1 = contour(x, y, f, fill=true)
|
||||
plot(p1, p2)
|
||||
# TODO: filled contours
|
||||
end # testset
|
||||
@testset "Varying colors" begin
|
||||
t = range(0, stop=1, length=100)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user