Skip to content

Remove "Demo" from example titles (part 2) #18867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/axisartist/demo_ticklabel_alignment.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
========================
Demo Ticklabel Alignment
========================
===================
Ticklabel alignment
===================

"""

Expand Down
6 changes: 3 additions & 3 deletions examples/axisartist/demo_ticklabel_direction.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
========================
Demo Ticklabel Direction
========================
===================
Ticklabel direction
===================

"""

Expand Down
6 changes: 3 additions & 3 deletions examples/event_handling/coords_demo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
===========
Coords demo
===========
===========================
Mouse move and click events
===========================

An example of how to interact with the plotting canvas by connecting to move
and click events.
Expand Down
33 changes: 11 additions & 22 deletions examples/event_handling/figure_axes_enter_leave.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
=======================
Figure Axes Enter Leave
=======================
==================================
Figure/Axes enter and leave events
==================================

Illustrate the figure and axes enter and leave events by changing the
frame colors on enter and leave
Illustrate the figure and Axes enter and leave events by changing the
frame colors on enter and leave.
"""
import matplotlib.pyplot as plt

Expand Down Expand Up @@ -32,24 +32,13 @@ def on_leave_figure(event):
event.canvas.figure.patch.set_facecolor('grey')
event.canvas.draw()

###############################################################################

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

fig1.canvas.mpl_connect('figure_enter_event', on_enter_figure)
fig1.canvas.mpl_connect('figure_leave_event', on_leave_figure)
fig1.canvas.mpl_connect('axes_enter_event', on_enter_axes)
fig1.canvas.mpl_connect('axes_leave_event', on_leave_axes)

###############################################################################

fig2, (ax, ax2) = plt.subplots(2, 1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fig2 is just an exact copy of the fig1 example.

fig2.suptitle('mouse hover over figure or axes to trigger events')

fig2.canvas.mpl_connect('figure_enter_event', on_enter_figure)
fig2.canvas.mpl_connect('figure_leave_event', on_leave_figure)
fig2.canvas.mpl_connect('axes_enter_event', on_enter_axes)
fig2.canvas.mpl_connect('axes_leave_event', on_leave_axes)
fig.canvas.mpl_connect('figure_enter_event', on_enter_figure)
fig.canvas.mpl_connect('figure_leave_event', on_leave_figure)
fig.canvas.mpl_connect('axes_enter_event', on_enter_axes)
fig.canvas.mpl_connect('axes_leave_event', on_leave_axes)

plt.show()
10 changes: 5 additions & 5 deletions examples/event_handling/keypress_demo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
=============
Keypress Demo
=============
==============
Keypress event
==============

Show how to connect to keypress events
Show how to connect to keypress events.
"""
import sys
import numpy as np
Expand All @@ -18,10 +18,10 @@ def on_press(event):
xl.set_visible(not visible)
fig.canvas.draw()


# Fixing random state for reproducibility
np.random.seed(19680801)


fig, ax = plt.subplots()

fig.canvas.mpl_connect('key_press_event', on_press)
Expand Down
11 changes: 8 additions & 3 deletions examples/misc/demo_agg_filter.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""
===============
Demo Agg Filter
===============
==========
AGG filter
==========

Most pixel-based backends in Matplotlib use `Anti-Grain Geometry (AGG)`_ for
rendering. You can modify the rendering of Artists by applying a filter via
`.Artist.set_agg_filter`.

.. _Anti-Grain Geometry (AGG): http://antigrain.com
"""

import matplotlib.cm as cm
Expand Down
2 changes: 1 addition & 1 deletion examples/pie_and_polar_charts/polar_demo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
==========
Polar Demo
Polar plot
==========

Demo of a line plot on a polar axis.
Expand Down
8 changes: 4 additions & 4 deletions examples/subplots_axes_and_figures/axis_equal_demo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
===============
Axis Equal Demo
===============
=======================
Equal axis aspect ratio
=======================

How to set and adjust plots with equal axis ratios.
How to set and adjust plots with equal axis aspect ratios.
"""

import matplotlib.pyplot as plt
Expand Down
19 changes: 15 additions & 4 deletions examples/subplots_axes_and_figures/multiple_figs_demo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
"""
==================
Multiple Figs Demo
==================
===================================
Managing multiple figures in pyplot
===================================

`matplotlib.pyplot` uses the concept of a *current figure* and *current axes*.
Figures are identified via a figure number that is passed to `~.pyplot.figure`.
The figure with the given number is set as *current figure*. Additionally, if
no figure with the number exists, a new one is created.

.. note::

We discourage working with multiple figures in pyplot because managing
the *current figure* is cumbersome and error-prone. Instead, we recommend
to use the object-oriented approach and call methods on Figure and Axes
instances.

Working with multiple figure windows and subplots
"""
import matplotlib.pyplot as plt
import numpy as np
Expand Down
8 changes: 4 additions & 4 deletions examples/subplots_axes_and_figures/shared_axis_demo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
================
Shared Axis Demo
================
===========
Shared Axis
===========

You can share the x or y axis limits for one axis with another by
passing an axes instance as a sharex or sharey kwarg.
passing an axes instance as a *sharex* or *sharey* keyword argument.

Changing the axis limits on one axes will be reflected automatically
in the other, and vice-versa, so when you navigate with the toolbar
Expand Down