Skip to content

Commit 056a94e

Browse files
authored
Fix plotting CartesianPoint with correct units (#551)
1 parent 610bcce commit 056a94e

File tree

1 file changed

+6
-2
lines changed
  • src/ConstructiveSolidGeometry/plotting/PointsAndVectors

1 file changed

+6
-2
lines changed

src/ConstructiveSolidGeometry/plotting/PointsAndVectors/Points.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
end
88
@series begin
99
seriestype --> :scatter
10-
[pt.x], [pt.y], [pt.z]
10+
[to_internal_units(pt.x) * internal_length_unit],
11+
[to_internal_units(pt.y) * internal_length_unit],
12+
[to_internal_units(pt.z) * internal_length_unit]
1113
end
1214
end
1315

@@ -35,7 +37,9 @@ end
3537
end
3638
@series begin
3739
if !isempty(v) seriestype --> :scatter end
38-
[v[i].x for i in eachindex(v)], [v[i].y for i in eachindex(v)], [v[i].z for i in eachindex(v)]
40+
[to_internal_units(v[i].x) * internal_length_unit for i in eachindex(v)],
41+
[to_internal_units(v[i].y) * internal_length_unit for i in eachindex(v)],
42+
[to_internal_units(v[i].z) * internal_length_unit for i in eachindex(v)]
3943
end
4044
end
4145

0 commit comments

Comments
 (0)