8000 Remove "Demo" from example titles (part 2) · matplotlib/matplotlib@fa9c8b9 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa9c8b9

Browse files
committed
Remove "Demo" from example titles (part 2)
1 parent e69e2e6 commit fa9c8b9

File tree

10 files changed

+57
-52
lines changed

10 files changed

+57
-52
lines changed

examples/axisartist/demo_ticklabel_alignment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
========================
3-
Demo Ticklabel Alignment
4-
========================
2+
===================
3+
Ticklabel alignment
4+
===================
55
66
"""
77

examples/axisartist/demo_ticklabel_direction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
========================
3-
Demo Ticklabel Direction
4-
========================
2+
===================
3+
Ticklabel direction
4+
===================
55
66
"""
77

examples/event_handling/coords_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
===========
3-
Coords demo
4-
===========
2+
===========================
3+
Mouse move and click events
4+
===========================
55
66
An example of how to interact with the plotting canvas by connecting to move
77
and click events.
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
=======================
3-
Figure Axes Enter Leave
4-
=======================
2+
==================================
3+
Figure/Axes enter and leave events
4+
==================================
55
6-
Illustrate the figure and axes enter and leave events by changing the
7-
frame colors on enter and leave
6+
Illustrate the figure and Axes enter and leave events by changing the
7+
frame colors on enter and leave.
88
"""
99
import matplotlib.pyplot as plt
1010

@@ -32,24 +32,13 @@ def on_leave_figure(event):
3232
event.canvas.figure.patch.set_facecolor('grey')
3333
event.canvas.draw()
3434

35-
###############################################################################
3635

37-
fig1, (ax, ax2) = plt.subplots(2, 1)
38-
fig1.suptitle('mouse hover over figure or axes to trigger events')
36+
fig, axs = plt.subplots(2, 1)
37+
fig.suptitle('mouse hover over figure or axes to trigger events')
3938

40-
fig1.canvas.mpl_connect('figure_enter_event', on_enter_figure)
41-
fig1.canvas.mpl_connect('figure_leave_event', on_leave_figure)
42-
fig1.canvas.mpl_connect('axes_enter_event', on_enter_axes)
43-
fig1.canvas.mpl_connect('axes_leave_event', on_leave_axes)
44-
45-
###############################################################################
46-
47-
fig2, (ax, ax2) = plt.subplots(2, 1)
48-
fig2.suptitle('mouse hover over figure or axes to trigger events')
49-
50-
fig2.canvas.mpl_connect('figure_enter_event', on_enter_figure)
51-
fig2.canvas.mpl_connect('figure_leave_event', on_leave_figure)
52-
fig2.canvas.mpl_connect('axes_enter_event', on_enter_axes)
53-
fig2.canvas.mpl_connect('axes_leave_event', on_leave_axes)
39+
fig.canvas.mpl_connect('figure_enter_event', on_enter_figure)
40+
fig.canvas.mpl_connect('figure_leave_event', on_leave_figure)
41+
fig.canvas.mpl_connect('axes_enter_event', on_enter_axes)
42+
fig.canvas.mpl_connect('axes_leave_event', on_leave_axes)
5443

5544
plt.show()

examples/event_handling/keypress_demo.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
2-
=============
3-
Keypress Demo
4-
=============
2+
==============
3+
Keypress event
4+
==============
55
6-
Show how to connect to keypress events
6+
Show how to connect to keypress events.
77
"""
88
import sys
99
import numpy as np
@@ -18,10 +18,10 @@ def on_press(event):
1818
xl.set_visible(not visible)
1919
fig.canvas.draw()
2020

21+
2122
# Fixing random state for reproducibility
2223
np.random.seed(19680801)
2324

24-
2525
fig, ax = plt.subplots()
2626

2727
fig.canvas.mpl_connect('key_press_event', on_press)

examples/misc/demo_agg_filter.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
"""
2-
===============
3-
Demo Agg Filter
4-
===============
2+
==========
3+
AGG filter
4+
==========
55
6+
Most pixel-based backends in Matplotlib use `Anti-Grain Geometry (AGG)`_ for
7+
rendering. You can modify the rendering of Artists by applying a filter via
8+
`.Artist.set_agg_filter`.
9+
10+
.. _Anti-Grain Geometry (AGG): http://antigrain.com
611
"""
712

813
import matplotlib.cm as cm

examples/pie_and_polar_charts/polar_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==========
3-
Polar Demo
3+
Polar plot
44
==========
55
66
Demo of a line plot on a polar axis.

examples/subplots_axes_and_figures/axis_equal_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
2-
===============
3-
Axis Equal Demo
4-
===============
2+
=======================
3+
Equal axis aspect ratio
4+
=======================
55
6-
How to set and adjust plots with equal axis ratios.
6+
How to set and adjust plots with equal axis aspect ratios.
77
"""
88

99
import matplotlib.pyplot as plt

examples/subplots_axes_and_figures/multiple_figs_demo.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
"""
2-
==================
3-
Multiple Figs Demo
4-
==================
2+
===================================
3+
Managing multiple figures in pyplot
4+
===================================
5+
6+
`matplotlib.pyplot` uses the concept of a *current figure* and *current axes*.
7+
Figures are identified via a figure number that is passed to `~.pyplot.figure`.
8+
The figure with the given number is set as *current figure*. Additionally, if
9+
no figure with the number exists, a new one is created.
10+
11+
.. note::
12+
13+
We discourage working with multiple figures in pyplot because managing
14+
the *current figure* is cumbersome and error-prone. Instead, we recommend
15+
to use the object-oriented approach and call methods on Figure and Axes
16+
instances.
517
6-
Working with multiple figure windows and subplots
718
"""
819
import matplotlib.pyplot as plt
920
import numpy as np

examples/subplots_axes_and_figures/shared_axis_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""
2-
================
3-
Shared Axis Demo
4-
================
5 2+
===========
3+
Shared Axis
4+
===========
55
66
You can share the x or y axis limits for one axis with another by
7-
passing an axes instance as a sharex or sharey kwarg.
7+
passing an axes instance as a *sharex* or *sharey* keyword argument.
88
99
Changing the axis limits on one axes will be reflected automatically
1010
in the other, and vice-versa, so when you navigate with the toolbar

0 commit comments

Comments
 (0)
0