Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
fix weird offset for 3d stem, remove weird 2d offset for 3d (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel authored Mar 16, 2021
1 parent 4832257 commit 61cd4c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/basic_recipes/stem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Plots markers at the given positions extending from `offset` along stem lines.
`offset` can be a number, in which case it sets y for 2D and also z for 3D stems.
It can be a Point2 for 2D plots and 3D plots, as well as a Point3 for 3D plots.
`offset` can be a number, in which case it sets y for 2D, and z for 3D stems.
It can be a Point2 for 2D plots, as well as a Point3 for 3D plots.
It can also be an iterable of any of these at the same length as xs, ys, zs.
The conversion trait of stem is `PointBased`.
Expand Down Expand Up @@ -42,8 +42,7 @@ conversion_trait(::Type{<:Stem}) = PointBased()

trunkpoint(stempoint::P, offset::Number) where P <: Point2 = P(stempoint[1], offset)
trunkpoint(stempoint::P, offset::Point2) where P <: Point2 = P(offset...)
trunkpoint(stempoint::P, offset::Number) where P <: Point3 = P(stempoint[1], offset, offset)
trunkpoint(stempoint::P, offset::Point2) where P <: Point3 = P(stempoint[1], offset[1], offset[2])
trunkpoint(stempoint::P, offset::Number) where P <: Point3 = P(stempoint[1], stempoint[2], offset)
trunkpoint(stempoint::P, offset::Point3) where P <: Point3 = P(offset...)


Expand Down

0 comments on commit 61cd4c5

Please sign in to comment.