From a54ff8a670a23db3f397b4d1aec72c854acd80ca Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 11 Nov 2019 18:51:54 +0100 Subject: [PATCH] a basic quiver plot --- src/backends.jl | 4 +++- src/backends/pgfplots.jl | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backends.jl b/src/backends.jl index 26f01c91..cbf14337 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -440,7 +440,9 @@ const _pgfplots_attr = merge_with_base_supported([ :grid, :legend, :colorbar, :colorbar_title, :fill_z, :line_z, :marker_z, :levels, - # :ribbon, :quiver, :arrow, + # :ribbon, + :quiver, + :arrow, # :orientation, # :overwrite_figure, :polar, diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 2893fd65..bde2718f 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -200,7 +200,11 @@ function pgf_series(sp::Subplot, series::Series) PGFPlots.Contour end push!(series_collection, func(args...; kw...)) - + elseif series[:arrow] isa Arrow + u, v = series[:quiver] + x = series[:x][2:4:end] + y = series[:y][2:4:end] + push!( series_collection, PGFPlots.Quiver(x,y,u,v, style="-stealth'") ) else # series segments segments = iter_segments(series)