code: def test_tick_position():
      # Test the position of the ticks depending on the axis domain
  
      canvas = scene.SceneCanvas(keys=None, size=(800, 600), show=True)
      view = canvas.central_widget.add_view()
      view.camera = scene.cameras.PanZoomCamera(parent=view.scene)
  
      axis1 = visuals.Axis(
          pos=[[-1.0, 0], [1.0, 0]],
          domain=(0.0, 1.25),
          parent=view.scene,
      )
  
      canvas.draw_visual(axis1)
      # Get a nice array of x ticks positions
      x_ticks_positions = axis1._ticks.pos[::2, ::2].flatten()
      # Compare major ticks first
      assert_allclose(x_ticks_positions[:3], (-1, -0.2, 0.6))
      # Then minor ticks
      assert_allclose(
          x_ticks_positions[3:],
          (
              -0.84,
              -0.68,
              -0.52,
              -0.36,
              -0.04,
              0.12,
              0.28,
              0.44,
              0.76,
              0.92,
          ),
      )
  
      # Flip the axis domain
      axis1.domain = (1.25, 0.0)
      canvas.draw_visual(axis1)
      x_ticks_positions = axis1._ticks.pos[::2, ::2].flatten()
      # Positions should be mirrored
      assert_allclose(x_ticks_positions[:3], (1, 0.2, -0.6))
      assert_allclose(
          x_ticks_positions[3:],
          (
              0.84,
              0.68,
              0.52,
              0.36,
              0.04,
              -0.12,
              -0.28,
              -0.44,
              -0.76,
              -0.92,
          ),
      )
  
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 5 for calling a global function with example usage: test_tick_position() without return types