Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b62ee99

Browse files
committed
Fix documentation: view_angles.rst, change default style
Documentation (view_angles.rst): - Fix: only one of :: and .. code:: is needed - Fix: :rc:`axes3d.trackballsize`/2 + :rc:`axes3d.trackballborder` does not work as a formula, use `trackballsize/2 + trackballborder` instead -Fix: $\sqrt 2 \approx 1.414$ now reads :math:`\sqrt 2 \approx 1.414` matplotlibrc: axes3d.mouserotationstyle: trackball The style 'trackball' as default is likely to make life easier for 99% of the users who don't touch this setting (it is easiest to understand, no surprises, it works the same in the middle and at the edge of the screen, no guesswork as to how it works/what it does).
1 parent eaa51a4 commit b62ee99

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/api/toolkits/mplot3d/view_angles.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Henriksen et al. [Henriksen2002]_ provide an overview. In summary:
129129
.. [5] The style has a corresponding natural implementation as a mechanical device
130130
.. [6] While it is possible to control roll with the ``trackball`` style, this is not immediately obvious (it requires moving the mouse in large circles) and a bit counterintuitive (the resulting roll is in the opposite direction)
131131
132-
You can try out one of the various mouse rotation styles using::
132+
You can try out one of the various mouse rotation styles using:
133133

134134
.. code::
135135
@@ -155,9 +155,9 @@ You can try out one of the various mouse rotation styles using::
155155
156156
Alternatively, create a file ``matplotlibrc``, with contents::
157157

158-
axes3d.mouserotationstyle: arcball
158+
axes3d.mouserotationstyle: trackball
159159

160-
(or any of the other styles, instead of ``arcball``), and then run any of
160+
(or any of the other styles, instead of ``trackball``), and then run any of
161161
the :ref:`mplot3d-examples-index` examples.
162162

163163
The size of the virtual trackball, sphere, or arcball can be adjusted
@@ -177,14 +177,14 @@ originally written for OpenGL [Bell1988]_, and is used in Blender and Meshlab.
177177
Bell's arcball extends the arcball's spherical control surface with a hyperbola;
178178
the two are smoothly joined. However, the hyperbola extends all the way beyond
179179
the edge of the plot. In the mplot3d sphere and arcball style, the border extends
180-
to a radius :rc:`axes3d.trackballsize`/2 + :rc:`axes3d.trackballborder`.
180+
to a radius `trackballsize/2 + trackballborder`.
181181
Beyond the border, the style works like the original: it controls roll only.
182182
A border width of about 0.2 appears to work well; this is the default.
183183
To obtain the original Shoemake's arcball with a sharp border,
184184
set the border width to 0.
185185
For an extended border similar to Bell's arcball, where the transition from
186186
the arcball to the border occurs at 45°, set the border width to
187-
$\sqrt 2 \approx 1.414$.
187+
:math:`\sqrt 2 \approx 1.414`.
188188

189189

190190
.. [Shoemake1992] Ken Shoemake, "ARCBALL: A user interface for specifying

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
#axes3d.yaxis.panecolor: (0.90, 0.90, 0.90, 0.5) # background pane on 3D axes
434434
#axes3d.zaxis.panecolor: (0.925, 0.925, 0.925, 0.5) # background pane on 3D axes
435435

436-
#axes3d.mouserotationstyle: arcball # {azel, trackball, sphere, arcball}
436+
#axes3d.mouserotationstyle: trackball # {azel, trackball, sphere, arcball}
437437
# See also https://matplotlib.org/stable/api/toolkits/mplot3d/view_angles.html#rotation-with-mouse
438438
#axes3d.trackballsize: 0.667 # trackball diameter, in units of the Axes bbox
439439
#axes3d.trackballborder: 0.2 # trackball border width, in units of the Axes bbox (only for 'sphere' and 'arcball' style)

0 commit comments

Comments
 (0)