code: def test_rotation_angle():
      # Make sure the rotation angle calculation is correct
  
      canvas = scene.SceneCanvas(keys=None, size=(800, 600), show=True)
      view = canvas.central_widget.add_view()
      view.camera = scene.cameras.TurntableCamera(
          parent=view.scene,
          fov=0.0,
          distance=4.0,
          elevation=0,
          azimuth=0,
          roll=0.0,
      )
  
      axis1 = visuals.Axis(pos=[[-1.0, 0], [1.0, 0]], parent=view.scene)
      assert_allclose(axis1._rotation_angle, 0)
  
      axis2 = visuals.Axis(
          pos=[[-(3**0.5) / 2.0, -0.5], [3**0.5 / 2.0, 0.5]],
          parent=view.scene,
      )
      assert_allclose(axis2._rotation_angle, 0.0)
  
      view.camera.elevation = 90.0
  
      assert_allclose(axis1._rotation_angle, 0)
      assert_allclose(axis2._rotation_angle, -30, rtol=1e-3)
  
      view.camera.elevation = 45.0
  
      assert_allclose(axis1._rotation_angle, 0)
      assert_allclose(axis2._rotation_angle, -22.207653, rtol=1e-3)
  
      view.camera.fov = 20.0
  
      assert_allclose(axis1._rotation_angle, 0)
      # OSX Travis has some small differences...sometimes
      assert_allclose(axis2._rotation_angle, -17.056795, rtol=0.05)
  
file_path: vispy/vispy/visuals/tests/test_axis.py
imports: from numpy.testing import assert_allclose, assert_array_equal
  from vispy import scene
  from vispy.scene import visuals
  from vispy.testing import requires_application, TestingCanvas, run_tests_if_main
label_desc: Use image node_id 3 for calling a global function with example usage: test_rotation_angle() without return types