Skip to content

Commit

Permalink
tried to do #107 quick, but no
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Dec 7, 2022
1 parent 1332602 commit 5ecdbe2
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/services/PlotPointCloudMap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function plotPointCloud(
top=7.0,
color = colorsPointCloud(pca;bottom,top),
colormap = ColorSchemes.gist_earth.colors,
markersize=2
markersize=2,
ax=nothing
)
vecX(pts) = (s->s.x).(pts)
vecY(pts) = (s->s.y).(pts)
Expand All @@ -35,6 +36,7 @@ function plotPointCloud(
Z = vecZ(pca.points)

plotfnc(
(isnothing(ax) ? () : (ax,))...,
X,Y,Z;
color,
markersize,
Expand Down Expand Up @@ -63,7 +65,7 @@ end

function plotGraphPointClouds(
dfg::AbstractDFG,
getpointcloud::Function = (v)->_PCL.getDataPointCloud(dfg, v, Regex("PCLPointCloud2"));
getpointcloud::Function = (v)->_PCL.getDataPointCloud(dfg, v, Regex("PCLPointCloud2"); checkhash=false);
varList = (listVariables(dfg) |> sortDFG .|> string),
solveKey = :default
)
Expand All @@ -74,7 +76,13 @@ function plotGraphPointClouds(
pc_map = nothing
pc_last = nothing

# fig = Figure()
# attempting to fix #107
# f = Figure()
# ERROR: `Makie.convert_arguments` for the plot type MakieCore.Scatter{Tuple{Makie.Axis3, Vector{Float32}, Vector{Float32}, Vector{Float32}}} and its conversion trait MakieCore.PointBased() was unsuccessful.
# ax = Axis3(
# f[1, 1],
# title = string(solveKey)
# )
# ax = Axis(fig[1,1]) #Axis3(fig[1, 1], viewmode=:stretch)

count = 0
Expand Down Expand Up @@ -108,7 +116,7 @@ function plotGraphPointClouds(
wPC = Caesar._PCL.apply(M, wPp, pc)

if pl isa Nothing
pl = plotPointCloud(wPC; plotfnc = scatter, col=-1.0)
pl = plotPointCloud(wPC; plotfnc = scatter, col=-1.0, ax=nothing)
pc_map = deepcopy(wPC)
else
# col = -1*(count%2)
Expand Down

0 comments on commit 5ecdbe2

Please sign in to comment.