@@ -304,7 +304,7 @@ class in the matplotlib API, and the one you will be working with most
304304# In [159]: ax1
305305# Out[159]: <matplotlib.axes.Subplot instance at 0xd54b26c>
306306#
307- # In [160]: print fig.axes
307+ # In [160]: print( fig.axes)
308308# [<matplotlib.axes.Subplot instance at 0xd54b26c>, <matplotlib.axes.Axes instance at 0xd3f0b2c>]
309309#
310310# Because the figure maintains the concept of the "current axes" (see
@@ -404,7 +404,7 @@ class in the matplotlib API, and the one you will be working with most
404404#
405405# .. sourcecode:: ipython
406406#
407- # In [229]: print ax.lines
407+ # In [229]: print( ax.lines)
408408# [<matplotlib.lines.Line2D instance at 0xd378b0c>]
409409#
410410# Similarly, methods that create patches, like
@@ -419,7 +419,7 @@ class in the matplotlib API, and the one you will be working with most
419419# In [234]: rectangles
420420# Out[234]: <a list of 50 Patch objects>
421421#
422- # In [235]: print len(ax.patches)
422+ # In [235]: print( len(ax.patches) )
423423#
424424# You should not add objects directly to the ``Axes.lines`` or
425425# ``Axes.patches`` lists unless you know exactly what you are doing,
@@ -445,42 +445,42 @@ class in the matplotlib API, and the one you will be working with most
445445# In [263]: rect = matplotlib.patches.Rectangle( (1,1), width=5, height=12)
446446#
447447# # by default the axes instance is None
448- # In [264]: print rect.get_axes()
448+ # In [264]: print( rect.get_axes() )
449449# None
450450#
451451# # and the transformation instance is set to the "identity transform"
452- # In [265]: print rect.get_transform()
452+ # In [265]: print( rect.get_transform() )
453453# <Affine object at 0x13695544>
454454#
455455# # now we add the Rectangle to the Axes
456456# In [266]: ax.add_patch(rect)
457457#
458458# # and notice that the ax.add_patch method has set the axes
459459# # instance
460- # In [267]: print rect.get_axes()
460+ # In [267]: print( rect.get_axes() )
461461# Axes(0.125,0.1;0.775x0.8)
462462#
463463# # and the transformation has been set too
464- # In [268]: print rect.get_transform()
464+ # In [268]: print( rect.get_transform() )
465465# <Affine object at 0x15009ca4>
466466#
467467# # the default axes transformation is ax.transData
468- # In [269]: print ax.transData
468+ # In [269]: print( ax.transData)
469469# <Affine object at 0x15009ca4>
470470#
471471# # notice that the xlimits of the Axes have not been changed
472- # In [270]: print ax.get_xlim()
472+ # In [270]: print( ax.get_xlim() )
473473# (0.0, 1.0)
474474#
475475# # but the data limits have been updated to encompass the rectangle
476- # In [271]: print ax.dataLim.bounds
476+ # In [271]: print( ax.dataLim.bounds)
477477# (1.0, 1.0, 5.0, 12.0)
478478#
479479# # we can manually invoke the auto-scaling machinery
480480# In [272]: ax.autoscale_view()
481481#
482482# # and now the xlim are updated to encompass the rectangle
483- # In [273]: print ax.get_xlim()
483+ # In [273]: print( ax.get_xlim() )
484484# (1.0, 6.0)
485485#
486486# # we have to manually force a figure draw
0 commit comments