X Tutup
Skip to content
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: 5 additions & 1 deletion examples/images_contours_and_fields/contourf_log.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
'''
============================
Contourf and log color scale
============================

Demonstrate use of a log color scale in contourf
'''

import matplotlib.pyplot as plt
import numpy as np
from numpy import ma
from matplotlib import colors, ticker, cm
from matplotlib import ticker, cm
from matplotlib.mlab import bivariate_normal

N = 100
Expand Down
4 changes: 4 additions & 0 deletions examples/images_contours_and_fields/image_demo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
===================
Displaying an image
===================

Simple demo of the imshow function.
"""
import matplotlib.pyplot as plt
Expand Down
4 changes: 4 additions & 0 deletions examples/images_contours_and_fields/image_demo_clip_path.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
============================
Clipping images with patches
============================

Demo of image that's been clipped by a circular patch.
"""
import matplotlib.pyplot as plt
Expand Down
28 changes: 16 additions & 12 deletions examples/images_contours_and_fields/interpolation_methods.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
'''
Show all different interpolation methods for imshow
'''
"""
=================================
Interpolations for imshow/matshow
=================================

import matplotlib.pyplot as plt
import numpy as np
This example displays the difference between interpolation methods for imshow
and matshow.

If `interpolation` is None, it defaults to the rc image.interpolation
parameter. If the interpolation is `none`, then no interpolation is performed
for the Agg, ps and pdf backends. Other backends will default to 'nearest'.

# from the docs:
For the Agg, ps and pdf backends, interpolation = 'none' works well when a big
image is scaled down, while interpolation = 'nearest' works well when a small
image is scaled up.
"""

# If interpolation is None, default to rc image.interpolation. See also
# the filternorm and filterrad parameters. If interpolation is 'none', then
# no interpolation is performed on the Agg, ps and pdf backends. Other
# backends will fall back to 'nearest'.
#
# http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.imshow
import matplotlib.pyplot as plt
import numpy as np

methods = [None, 'none', 'nearest', 'bilinear', 'bicubic', 'spline16',
'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
Expand Down

This file was deleted.

4 changes: 4 additions & 0 deletions examples/images_contours_and_fields/pcolormesh_levels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
==========
pcolormesh
==========

Shows how to combine Normalization and Colormap instances to draw
"levels" in pcolor, pcolormesh and imshow type plots in a similar
way to the levels keyword argument to contour/contourf.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
==========
Streamplot
==========

Demo of the `streamplot` function.

A streamplot, or streamline plot, is used to display 2D vector fields. This
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Demo of the streamplot function with masking.
================================
Streamplot function with masking
================================

This example shows how streamlines created by the streamplot function skips
masked regions and NaN values.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Demo of the streamplot function with starting points.
========================================
Streamplot function with starting points
========================================

This example shows how to fix the streamlines that are plotted, by passing
an array of seed points to the `start_points` keyword argument.
Expand Down
4 changes: 4 additions & 0 deletions examples/scales/scales.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
======
Scales
======

Illustrate the scale transformations applied to axes, e.g. log, symlog, logit.
"""
import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions examples/shapes_and_collections/artist_reference.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
================================
Reference for matplotlib artists
================================

This example displays several of matplotlib's graphics primitives (artists)
drawn using matplotlib API. A full list of artists and the documentation is
Expand Down
4 changes: 3 additions & 1 deletion examples/shapes_and_collections/path_patch_demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Demo of a PathPatch object.
================
PathPatch object
================
"""
import matplotlib.path as mpath
import matplotlib.patches as mpatches
Expand Down
6 changes: 5 additions & 1 deletion examples/shapes_and_collections/scatter_demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
"""
Simple demo of a scatter plot.
============
Scatter plot
============

This example showcases a simple scatter plot.
"""
import numpy as np
import matplotlib.pyplot as plt
Expand Down
8 changes: 7 additions & 1 deletion examples/showcase/anatomy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# This figure shows the name of several matplotlib elements composing a figure
"""
===================
Anatomy of a figure
===================

This figure shows the name of several matplotlib elements composing a figure
"""

import numpy as np
import matplotlib.pyplot as plt
Expand Down
4 changes: 4 additions & 0 deletions examples/showcase/bachelors_degrees_by_gender.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
============================
Bachelor's degrees by gender
============================

A graph of multiple time series which demonstrates extensive custom
styling of plot frame, tick lines and labels, and line graph properties.

Expand Down
6 changes: 6 additions & 0 deletions examples/showcase/firefox.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""
=======
Firefox
=======
"""

import re
import numpy as np
import matplotlib.pyplot as plt
Expand Down
4 changes: 3 additions & 1 deletion examples/showcase/integral_demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Plot demonstrating the integral as the area under a curve.
==================================
Integral as the area under a curve
==================================

Although this is a simple example, it demonstrates some important tweaks:

Expand Down
4 changes: 4 additions & 0 deletions examples/specialty_plots/advanced_hillshading.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
===========
Hillshading
===========

Demonstrates a few common tricks with shaded plots.
"""
import numpy as np
Expand Down
4 changes: 3 additions & 1 deletion examples/specialty_plots/hinton_demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Demo of a function to create Hinton diagrams.
===============
Hinton diagrams
===============

Hinton diagrams are useful for visualizing the values of a 2D array (e.g.
a weight matrix): Positive and negative values are represented by white and
Expand Down
4 changes: 4 additions & 0 deletions examples/specialty_plots/topographic_hillshading.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
=======================
Topographic hillshading
=======================

Demonstrates the visual effect of varying blend mode and vertical exaggeration
on "hillshaded" plots.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
=================================
Different scales on the same axes
=================================

Demo of how to display two scales on the left and right y axis.

This example uses the Fahrenheit and Celsius scales.
Expand Down
4 changes: 4 additions & 0 deletions examples/subplots_axes_and_figures/subplot_demo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""
=================
Multiple subplots
=================

Simple demo with multiple subplots.
"""
import numpy as np
Expand Down
X Tutup