Skip to content

Commit

Permalink
Merge pull request #201 from MakieOrg/hw/zshift
Browse files Browse the repository at this point in the history
workaround for #192
  • Loading branch information
hexaeder authored Dec 5, 2024
2 parents 06e6953 + 9fc6e3d commit 8cf2729
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Binary file added assets/reftests.jl-44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/examples/reftests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,8 @@ hidedecorations!(ax)
# update `Observable`
ec[] = Dict(Edge(7,2)=> :green)
@save_reference fig

# test 3d plots with i-labels
g = complete_graph(4)
fig,ax,p = graphplot(g; ilabels=["a", "b", "c", "d"], layout=NetworkLayout.Stress(dim=3))
@save_reference fig
3 changes: 2 additions & 1 deletion src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ function Makie.plot!(gp::GraphPlot)
fontsize=gp.ilabels_fontsize,
gp.ilabels_attr...)

translate!(ilabels_plot, 0, 0, 1)
# only shift very litte to mess less with 3d plots
translate!(ilabels_plot, 0f32, 0f32, nextfloat(0f32))

node_size_m = lift(ilabels_plot.plots[1][1], gp.ilabels_fontsize, gp.node_size) do glyphcollections, ilabels_fontsize, node_size
map(enumerate(glyphcollections)) do (i, gc)
Expand Down

0 comments on commit 8cf2729

Please sign in to comment.