diff --git a/src/PlotRecipes/ChargeCloudModels.jl b/src/PlotRecipes/ChargeCloudModels.jl index 9b082d703..13c7d9e48 100644 --- a/src/PlotRecipes/ChargeCloudModels.jl +++ b/src/PlotRecipes/ChargeCloudModels.jl @@ -287,4 +287,32 @@ end end end end +end + + +@recipe function f(s::AbstractParticleSource) + if isa(s.direction, CartesianVector) + length_direction = norm(s.direction) + new_vector = s.direction/length_direction * 0.025 + linewidth --> 3 + linecolor --> :green + linealpha --> 0.5 + + @series begin + [s.position.x, s.position.x + new_vector.x],[s.position.y, s.position.y + new_vector.y],[s.position.z, s.position.z + new_vector.z] + end + end + markersize --> 10 + markerstrokewidth --> 0 + + alpha := 1.0 + if isa(s.direction, CartesianVector) + color := :blue + else + color := :green + end + + @series begin + s.position + end end \ No newline at end of file