@@ -642,8 +642,8 @@ def do_3d_projection(self, renderer=None):
642642
643643
644644def _update_scalarmappable (sm ):
645-
646- """ Update a 3D ScalarMappable.
645+ """
646+ Update a 3D ScalarMappable.
647647
648648 With ScalarMappable objects if the data, colormap, or norm are
649649 changed, we need to update the computed colors. This is handled
@@ -657,40 +657,40 @@ def _update_scalarmappable(sm):
657657 handled in the ``do_3d_projection`` methods which are called from the
658658 draw method of the 3D Axes. These methods:
659659
660- - do the projection from 3D -> 2D
661- - internally sort based on depth
662- - stash the results of the above in the 2D analogs of state
663- - return the z-depth of the whole artist
660+ - do the projection from 3D -> 2D
661+ - internally sort based on depth
662+ - stash the results of the above in the 2D analogs of state
663+ - return the z-depth of the whole artist
664664
665665 the last step is so that we can, at the Axes level, sort the children by
666666 depth.
667667
668- The base `draw` method of the 2D artists unconditionally call
668+ The base `draw` method of the 2D artists unconditionally calls
669669 update_scalarmappable and rely on the method's internal caching logic to
670670 lazily evaluate.
671671
672672 These things together mean you can have the sequence of events:
673673
674- - we create the artist, to the color mapping and stash the results in a 3D
674+ - we create the artist, do the color mapping and stash the results in a 3D
675675 specific state.
676676 - change something about the ScalarMappable that marks it as in need of an
677677 update (`ScalarMappable.changed` and friends).
678678 - We call do_3d_projection and shuffle the stashed colors into the 2D version
679679 of face colors
680680 - the draw method calls the update_scalarmappable method which overwrites our
681681 shuffled colors
682- - we get a render this is wrong
682+ - we get a render that is wrong
683683 - if we re-render (either with a second save or implicitly via
684- tight_layout / constairned_layout / bbox_inches='tight' (ex via
684+ tight_layout / constrained_layout / bbox_inches='tight' (ex via
685685 inline's defaults)) we again shuffle the 3D colors
686686 - because the CM is not marked as changed update_scalarmappable is a no-op and
687687 we get a correct looking render.
688688
689689 This function is an internal helper to:
690690
691- - sort out if we need to do the color mapping at all (has data!)
692- - sort out if update_scalarmappable is going to be a no-op
693- - copy the data over from the 2D -> 3D version
691+ - sort out if we need to do the color mapping at all (has data!)
692+ - sort out if update_scalarmappable is going to be a no-op
693+ - copy the data over from the 2D -> 3D version
694694
695695 This must be called first thing in do_3d_projection to make sure that
696696 the correct colors get shuffled.
0 commit comments