Note
Go to the end to download the full example code.
Axes Helper 1
Example showing the axes helper.
The axes must be centered in the middle.
The red axes (x) must be to the right.
The green axes (y) must be to the top.
The blue axes (z) is not visible.

from rendercanvas.auto import RenderCanvas, loop
import pygfx as gfx
canvas = RenderCanvas()
renderer = gfx.renderers.WgpuRenderer(canvas)
scene = gfx.Scene()
scene.add(gfx.AxesHelper(size=40, thickness=5))
camera = gfx.OrthographicCamera(100, 100)
canvas.request_draw(lambda: renderer.render(scene, camera))
if __name__ == "__main__":
print(__doc__)
loop.run()
Total running time of the script: (0 minutes 0.158 seconds)
Gallery generated by Sphinx-Gallery
Interactive example
Try this example in your browser using Pyodide. Might not work with all examples and all devices. Check the output and your browser’s console for details.