You are reading an old version of the documentation (v1.5.3). For the latest version see

Matplotlib 2.0.0rc2 is available

Install the release candidate now!



This Page

lines_bars_and_markers example code: marker_fillstyle_reference.pyΒΆ

(Source code, png, hires.png, pdf)

Reference for marker fill-styles included with Matplotlib.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D

points = np.ones(5)  # Draw 3 points for each line
text_style = dict(horizontalalignment='right', verticalalignment='center',
                  fontsize=12, fontdict={'family': 'monospace'})
marker_style = dict(color='cornflowerblue', linestyle=':', marker='o',
                    markersize=15, markerfacecoloralt='gray')

def format_axes(ax):

def nice_repr(text):
    return repr(text).lstrip('u')

fig, ax = plt.subplots()

# Plot all fill styles.
for y, fill_style in enumerate(Line2D.fillStyles):
    ax.text(-0.5, y, nice_repr(fill_style), **text_style)
    ax.plot(y * points, fillstyle=fill_style, **marker_style)
    ax.set_title('fill style')

Keywords: python, matplotlib, pylab, example, codex (see Search examples)