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

Skip to content

MEP 12: Gallery cleanup and reorganization #1623

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

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
31c4b57
STY: Refactor string formatting/templating
tonysyu Dec 18, 2012
a16e793
Clean-up and move scatter_demo
tonysyu Dec 18, 2012
a22ed53
Cleanup and move fill_demo
tonysyu Dec 18, 2012
48caac8
Cleanup and move pie_demo
tonysyu Dec 18, 2012
7f1887b
Cleanup and move errorbar_demo.
tonysyu Dec 18, 2012
b10a877
Cleanup and move fill_demo2
tonysyu Dec 18, 2012
6995e54
Cleanup and move histogram_demo
tonysyu Dec 18, 2012
48fab58
Cleanup and move hinton_demo
tonysyu Dec 18, 2012
e9bfbb9
Cleanup and move image_demo3.py
tonysyu Dec 18, 2012
87aba29
DOC: Minor rewording
tonysyu Dec 21, 2012
c0f42d7
Fix doc build to search in new example sections.
tonysyu Dec 21, 2012
e244d9b
Cleanup and move subplot_demo
tonysyu Dec 21, 2012
002ca7a
Update example section titles
tonysyu Dec 21, 2012
402b301
Cleanup and move unicode_demo
tonysyu Dec 21, 2012
529d9f7
Consolidate histogram examples
tonysyu Dec 22, 2012
6acc43a
Cleanup and move vertical_ticklabels demo
tonysyu Dec 22, 2012
7f7c013
Cleanup and move clippath_demo
tonysyu Dec 23, 2012
ab417eb
Rename imshow_demo to image_demo
tonysyu Dec 23, 2012
5a77ad8
Cleanup and move polar_bar demo
tonysyu Dec 23, 2012
e4dce4e
Cleanup and move polar scatter demo
tonysyu Dec 23, 2012
cc18501
Cleanup and move text themes demo
tonysyu Dec 23, 2012
d02d560
Cleanup and move path_patch demo
tonysyu Dec 23, 2012
ec8a487
Clean up and move integral demo
tonysyu Dec 23, 2012
acc69cc
Extract spines_demo_bounds from spine_placement_demo
tonysyu Dec 23, 2012
800deb4
Extract spines_demo from spine_placement_demo
tonysyu Dec 23, 2012
edce62b
Cleanup integral_demo
tonysyu Dec 23, 2012
405cbc5
Cleanup and move dash_control demo
tonysyu Dec 23, 2012
30a85ba
Clean up and move color_cycle demo
tonysyu Dec 24, 2012
7175e06
Tweak subplot layout to prevent label clipping
tonysyu Dec 24, 2012
5020952
Add colormap references based on show_colormaps
tonysyu Dec 24, 2012
fae23d6
Clean up and move artist demo
tonysyu Dec 24, 2012
abfdea4
Clean up and move streamplot demos
tonysyu Dec 24, 2012
8f4be5b
Combine colormap reference examples
tonysyu Dec 24, 2012
917c329
Clean up and move barh_demo
tonysyu Dec 24, 2012
1e579d8
STY: Combine declarations of example directories
tonysyu Dec 30, 2012
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
Prev Previous commit
Next Next commit
Clean up and move color_cycle demo
  • Loading branch information
tonysyu committed Dec 24, 2012
commit 30a85ba22246884573f572b758fca25c367bc55c
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'statistics',
'images_contours_and_fields',
'pie_and_polar_charts',
'color',
'text_labels_and_annotations',
'ticks_and_spines',
'subplots_axes_and_figures',
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxext/gen_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'subplots_axes_and_figures': 'Subplots, axes, and figures',
'specialty_plots': 'Specialty plots',
'showcase': 'Showcase',
'color': 'Color',
'api': 'API',
}

Expand Down
28 changes: 0 additions & 28 deletions examples/api/color_cycle.py

This file was deleted.

34 changes: 34 additions & 0 deletions examples/color/color_cycle_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Demo of custom color-cycle settings to control colors for multi-line plots.

This example demonstrates two different APIs:

1. Setting the default rc-parameter specifying the color cycle.
This affects all subsequent plots.
2. Setting the color cycle for a specific axes. This only affects a single
axes.
"""
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 2 * np.pi)
offsets = np.linspace(0, 2*np.pi, 4, endpoint=False)
# Create array with shifted-sine curve along each column
yy = np.transpose([np.sin(x + phi) for phi in offsets])

plt.rc('lines', linewidth=4)
fig, (ax0, ax1) = plt.subplots(nrows=2)

plt.rc('axes', color_cycle=['r', 'g', 'b', 'y'])
ax0.plot(yy)
ax0.set_title('Set default color cycle to rgby')

ax1.set_color_cycle(['c', 'm', 'y', 'k'])
ax1.plot(yy)
ax1.set_title('Set axes color cycle to cmyk')

# Tweak spacing between subplots to prevent labels from overlapping
plt.subplots_adjust(hspace=0.3)
plt.show()