Skip to content

Commit

Permalink
Fix GLMakie naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Apr 3, 2024
1 parent 28967de commit 02cd50f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/stats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end
function show_stats(stats::Stats)
HEIGHT=330
UPPER_BORDER=20
fig = GLMakie.Figure(size = (400, HEIGHT))
fig = KiteViewers.GLMakie.Figure(size = (400, HEIGHT))
if Sys.islinux()
# sudo apt install ttf-bitstream-vera
lin_font="/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf"
Expand All @@ -26,8 +26,8 @@ function show_stats(stats::Stats)
font="Courier New"
end
function print(lbl::String, value::String; line, font=font)
GLMakie.text!(fig.scene, 20, HEIGHT-UPPER_BORDER-line*32; text=lbl, fontsize = 24, space=:pixel)
GLMakie.text!(fig.scene, 250, HEIGHT-UPPER_BORDER-line*32; text=value, fontsize = 24, font, space=:pixel)
KiteViewers.GLMakie.text!(fig.scene, 20, HEIGHT-UPPER_BORDER-line*32; text=lbl, fontsize = 24, space=:pixel)
KiteViewers.GLMakie.text!(fig.scene, 250, HEIGHT-UPPER_BORDER-line*32; text=value, fontsize = 24, font, space=:pixel)
line +=1
end
line = print("energy: ", @sprintf("%5.0f Wh", stats.e_mech); line = 1)
Expand All @@ -40,6 +40,6 @@ function show_stats(stats::Stats)
line = print("min az_ro: ", @sprintf("%5.1f °", stats.min_az_ro); line)
line = print("max az_ro: ", @sprintf("%5.1f °", stats.max_az_ro); line)

display(GLMakie.Screen(), fig)
display(KiteViewers.GLMakie.Screen(), fig)
nothing
end

0 comments on commit 02cd50f

Please sign in to comment.