0% found this document useful (0 votes)
9 views91 pages

Matplotlib Fix1 Itebooks PDF Download

The document provides links to various ebooks related to Matplotlib, including titles such as 'Matplotlib For Python Developers' and 'Mastering Matplotlib'. It also includes a detailed table of contents for the Matplotlib release 1.5.1, covering topics from default style changes to advanced guides and FAQs. The document serves as a resource for users looking to explore and download Matplotlib-related literature.

Uploaded by

leemonadsiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views91 pages

Matplotlib Fix1 Itebooks PDF Download

The document provides links to various ebooks related to Matplotlib, including titles such as 'Matplotlib For Python Developers' and 'Mastering Matplotlib'. It also includes a detailed table of contents for the Matplotlib release 1.5.1, covering topics from default style changes to advanced guides and FAQs. The document serves as a resource for users looking to explore and download Matplotlib-related literature.

Uploaded by

leemonadsiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

Matplotlib Fix1 Itebooks download

https://ebookbell.com/product/matplotlib-fix1-itebooks-23837102

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Matplotlib For Python Developers Tosi Sandro

https://ebookbell.com/product/matplotlib-for-python-developers-tosi-
sandro-22091690

Matplotlib Plotting Cookbook Alexandre Devert

https://ebookbell.com/product/matplotlib-plotting-cookbook-alexandre-
devert-4952424

Matplotlib 2 By Example Allen Yu Claire Chung Aldrin Yim

https://ebookbell.com/product/matplotlib-2-by-example-allen-yu-claire-
chung-aldrin-yim-6723604

Matplotlib For Python Developers Effective Techniques For Data


Visualization With Python 2nd Edition Aldrin Chung Claire Yu Allen Yim

https://ebookbell.com/product/matplotlib-for-python-developers-
effective-techniques-for-data-visualization-with-python-2nd-edition-
aldrin-chung-claire-yu-allen-yim-11144400
Matplotlib 30 Cookbook 1st Edition Srinivasa Rao Poladi

https://ebookbell.com/product/matplotlib-30-cookbook-1st-edition-
srinivasa-rao-poladi-7265678

Matplotlib For Python Developers 2nd Edition Yu Allen Chung

https://ebookbell.com/product/matplotlib-for-python-developers-2nd-
edition-yu-allen-chung-61234388

Mastering Matplotlib With Python For Developers Effective Techniques


For Data Visualization With Python Melendez

https://ebookbell.com/product/mastering-matplotlib-with-python-for-
developers-effective-techniques-for-data-visualization-with-python-
melendez-58304706

Mastering Matplotlib Duncan M Mcgreggor

https://ebookbell.com/product/mastering-matplotlib-duncan-m-
mcgreggor-42932608

Python And Matplotlib Essentials For Scientists And Engineers Matt A


Wood

https://ebookbell.com/product/python-and-matplotlib-essentials-for-
scientists-and-engineers-matt-a-wood-36155290
Matplotlib
Release 1.5.1

John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the ma

January 10, 2016


CONTENTS

I Default Style Changes 1

1 Colormap 3

2 Everything Else 5

II User’s Guide 7

3 Introduction 9

4 Configuration Guide 11
4.1 Installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Customizing matplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 Using matplotlib in a python shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5 Beginner’s Guide 29
5.1 Pyplot tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2 Customizing plots with style sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.3 Interactive navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4 Working with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.5 Image tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.6 Legend guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.7 Annotating Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.8 Screenshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.9 Choosing Colormaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.10 Colormap Normaliztions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

6 Advanced Guide 161


6.1 Artist tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
6.2 Customizing Location of Subplot Using GridSpec . . . . . . . . . . . . . . . . . . . . . . 173
6.3 Tight Layout guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.4 Event handling and picking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
6.5 Transformations Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
6.6 Path Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
6.7 Path effects guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
6.8 Our Favorite Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

i
7 What’s new in matplotlib 233
7.1 new in matplotlib-1.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
7.2 new in matplotlib-1.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
7.3 new in matplotlib-1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
7.4 new in matplotlib 1.2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
7.5 new in matplotlib-1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
7.6 new in matplotlib-1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
7.7 new in matplotlib-1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
7.8 new in matplotlib-0.99 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
7.9 new in 0.98.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

8 Github Stats 305

9 License 365
9.1 Copyright Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
9.2 License agreement for matplotlib 1.5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
9.3 License agreement for matplotlib versions prior to 1.3.0 . . . . . . . . . . . . . . . . . . . 366

10 Credits 369

III The Matplotlib FAQ 373

11 Installation 375
11.1 Report a compilation problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
11.2 matplotlib compiled fine, but nothing shows up when I use it . . . . . . . . . . . . . . . . . 375
11.3 How to completely remove matplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
11.4 How to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
11.5 Linux Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
11.6 OS-X Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
11.7 Windows Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

12 Usage 383
12.1 General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
12.2 Parts of a Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
12.3 Types of inputs to plotting functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
12.4 Matplotlib, pyplot and pylab: how are they related? . . . . . . . . . . . . . . . . . . . . . . 386
12.5 Coding Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
12.6 What is a backend? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
12.7 WX backends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
12.8 GTK and Cairo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
12.9 How do I select PyQt4 or PySide? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
12.10 What is interactive mode? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391

13 How-To 395
13.1 Plotting: howto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
13.2 Contributing: howto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
13.3 Matplotlib in a web application server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
13.4 Search examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

ii
13.5 Cite Matplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

14 Troubleshooting 409
14.1 Obtaining matplotlib version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
14.2 matplotlib install location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
14.3 matplotlib configuration and cache directory locations . . . . . . . . . . . . . . . . . . . 409
14.4 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
14.5 Problems with recent git versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

15 Environment Variables 413


15.1 Setting environment variables in Linux and OS-X . . . . . . . . . . . . . . . . . . . . . . . 413
15.2 Setting environment variables in windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

16 Working with Matplotlib in Virtual environments 415


16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
16.2 GUI Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
16.3 OSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416

IV External Resources 419

17 Books, Chapters and Articles 421

18 Videos 423

19 Tutorials 425

V The Matplotlib Developers’ Guide 427

20 Coding guide 429


20.1 Pull request checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
20.2 Style guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
20.3 Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433

21 Writing code for Python 2 and 3 435


21.1 Welcome to the __future__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
21.2 Finding places to use six . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
21.3 The dreaded \u escapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
21.4 Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
21.5 Numpy-specific things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437

22 Licenses 439
22.1 Why BSD compatible? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

23 Working with matplotlib source code 441


23.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
23.2 Install git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
23.3 Following the latest source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
23.4 Git for development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442

iii
23.5 git resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
23.6 Making a patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

24 Testing 455
24.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
24.2 Running the tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
24.3 Writing a simple test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
24.4 Writing an image comparison test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
24.5 Freetype version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
24.6 Known failing tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
24.7 Creating a new module in matplotlib.tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
24.8 Using Travis CI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
24.9 Using tox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

25 Documenting matplotlib 461


25.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
25.2 Organization of matplotlib’s documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 461
25.3 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
25.4 Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
25.5 Referring to mpl documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
25.6 Internal section references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
25.7 Section names, etc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
25.8 Inheritance diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
25.9 Emacs helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

26 Doing a matplotlib release 473


26.1 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
26.2 Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
26.3 Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
26.4 Update PyPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
26.5 Documentation updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
26.6 Announcing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

27 Working with transformations 477


27.1 matplotlib.transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

28 Adding new scales and projections to matplotlib 499


28.1 Creating a new scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
28.2 Creating a new projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
28.3 API documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501

29 Default Color changes 511


29.1 Default Heat Map Colormap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
29.2 Default Scatter Colormap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
29.3 Color Cycle / Qualitative color map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

30 Matplotlib Enhancement Proposals 515


30.1 MEP Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
30.2 MEP8: PEP8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

iv
30.3 MEP9: Global interaction manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
30.4 MEP10: Docstring consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
30.5 MEP11: Third-party dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
30.6 MEP12: Improve Gallery and Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
30.7 MEP12: Use properties for Artists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
30.8 MEP13: Text handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
30.9 MEP15 - Fix axis autoscaling when limits are specified for one axis only . . . . . . . . . . 541
30.10 MEP19: Continuous Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
30.11 MEP21: color and cm refactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
30.12 MEP22: Toolbar rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
30.13 MEP23: Multiple Figures per GUI window . . . . . . . . . . . . . . . . . . . . . . . . . . 551
30.14 MEP24: negative radius in polar plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
30.15 MEP25: Serialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
30.16 MEP26: Artist styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
30.17 MEP27: decouple pyplot from backends . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

VI Matplotlib AxesGrid Toolkit 565

31 Overview of AxesGrid toolkit 569


31.1 What is AxesGrid toolkit? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
31.2 AXES_GRID1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
31.3 AXISARTIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

32 The Matplotlib AxesGrid Toolkit User’s Guide 591


32.1 AxesDivider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
32.2 AXISARTIST namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594

33 The Matplotlib AxesGrid Toolkit API 607


33.1 mpl_toolkits.axes_grid.axes_size . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
33.2 mpl_toolkits.axes_grid.axes_divider . . . . . . . . . . . . . . . . . . . . . . . . . 608
33.3 mpl_toolkits.axes_grid.axes_grid . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
33.4 mpl_toolkits.axes_grid.axis_artist . . . . . . . . . . . . . . . . . . . . . . . . . 614

34 The Matplotlib axes_grid1 Toolkit API 617


34.1 mpl_toolkits.axes_grid1.inset_locator . . . . . . . . . . . . . . . . . . . . . . . 617

VII mplot3d 629

35 Matplotlib mplot3d toolkit 631


35.1 mplot3d tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
35.2 mplot3d API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654
35.3 mplot3d FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683

VIII Toolkits 685

36 Mapping Toolkits 689

v
36.1 Basemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
36.2 Cartopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690

37 General Toolkits 691


37.1 mplot3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
37.2 AxesGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
37.3 MplDataCursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
37.4 GTK Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
37.5 Excel Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
37.6 Natgrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
37.7 Matplotlib-Venn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
37.8 mplstereonet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

38 High-Level Plotting 801


38.1 seaborn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
38.2 ggplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
38.3 prettyplotlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
38.4 iTerm2 terminal backend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801

IX The Matplotlib API 803

39 Plotting commands summary 805

40 API Changes 813


40.1 Changes in 1.5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
40.2 Changes in 1.4.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
40.3 Changes in 1.3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
40.4 Changes in 1.2.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
40.5 Changes in 1.1.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828
40.6 Changes beyond 0.99.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
40.7 Changes in 0.99 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
40.8 Changes for 0.98.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
40.9 Changes for 0.98.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
40.10 Changes for 0.98.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833
40.11 Changes for 0.91.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837
40.12 Changes for 0.91.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
40.13 Changes for 0.91.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
40.14 Changes for 0.90.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
40.15 Changes for 0.90.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840
40.16 Changes for 0.87.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
40.17 Changes for 0.86 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
40.18 Changes for 0.85 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
40.19 Changes for 0.84 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
40.20 Changes for 0.83 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
40.21 Changes for 0.82 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
40.22 Changes for 0.81 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
40.23 Changes for 0.80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847

vi
40.24 Changes for 0.73 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
40.25 Changes for 0.72 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847
40.26 Changes for 0.71 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
40.27 Changes for 0.70 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
40.28 Changes for 0.65.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
40.29 Changes for 0.65 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
40.30 Changes for 0.63 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
40.31 Changes for 0.61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
40.32 Changes for 0.60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
40.33 Changes for 0.54.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
40.34 Changes for 0.54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
40.35 Changes for 0.50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854
40.36 Changes for 0.42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
40.37 Changes for 0.40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856

41 The top level matplotlib module 859

42 afm (Adobe Font Metrics interface) 863


42.1 matplotlib.afm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863

43 animation 867
43.1 matplotlib.animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867

44 artists 875
44.1 matplotlib.artist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877

45 axes 887
45.1 matplotlib.axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887

46 axis 1079
46.1 matplotlib.axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079

47 backends 1089
47.1 matplotlib.backend_bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089
47.2 matplotlib.backend_managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1108
47.3 matplotlib.backend_tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111
47.4 matplotlib.backends.backend_gtkagg . . . . . . . . . . . . . . . . . . . . . . . . . 1120
47.5 matplotlib.backends.backend_qt4agg . . . . . . . . . . . . . . . . . . . . . . . . . 1120
47.6 matplotlib.backends.backend_wxagg . . . . . . . . . . . . . . . . . . . . . . . . . . 1120
47.7 matplotlib.backends.backend_pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . 1121

48 cbook 1125
48.1 matplotlib.cbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125

49 cm (colormap) 1141
49.1 matplotlib.cm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1141

50 collections 1145
50.1 matplotlib.collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1145

vii
51 colorbar 1305
51.1 matplotlib.colorbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1305

52 colors 1311
52.1 matplotlib.colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1311

53 dates 1323
53.1 matplotlib.dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1323

54 dviread 1335
54.1 matplotlib.dviread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1335

55 figure 1339
55.1 matplotlib.figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1339

56 finance 1361
56.1 matplotlib.finance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1361

57 font_manager 1371
57.1 matplotlib.font_manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1371
57.2 matplotlib.fontconfig_pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1377

58 gridspec 1379
58.1 matplotlib.gridspec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1379

59 image 1383
59.1 matplotlib.image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1383

60 Legend 1389
60.1 matplotlib.legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1389
60.2 matplotlib.legend_handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1392

61 lines 1397
61.1 matplotlib.lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1397

62 Markers 1407
62.1 matplotlib.markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1407

63 mathtext 1411
63.1 matplotlib.mathtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1413

64 mlab 1429
64.1 matplotlib.mlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1429

65 offsetbox 1459
65.1 matplotlib.offsetbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1459

66 patches 1471
66.1 matplotlib.patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1471

viii
67 path 1511
67.1 matplotlib.path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1511

68 patheffects 1519
68.1 matplotlib.patheffects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1519

69 pyplot 1523
69.1 matplotlib.pyplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1523

70 sankey 1709
70.1 matplotlib.sankey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1709

71 spines 1717
71.1 matplotlib.spines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1717

72 style 1721
72.1 matplotlib.style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1721

73 text 1723
73.1 matplotlib.text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1723

74 ticker 1737
74.1 matplotlib.ticker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1737

75 tight_layout 1747
75.1 matplotlib.tight_layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1747

76 triangular grids 1749


76.1 matplotlib.tri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1749

77 type1font 1761
77.1 matplotlib.type1font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1761

78 units 1763
78.1 matplotlib.units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1763

79 widgets 1765
79.1 matplotlib.widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1765

X Matplotlib Examples 1779

80 animation Examples 1781


80.1 animation example code: animate_decay.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1781
80.2 animation example code: basic_example.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1782
80.3 animation example code: basic_example_writer.py . . . . . . . . . . . . . . . . . . . . . . 1783
80.4 animation example code: bayes_update.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1784
80.5 animation example code: double_pendulum_animated.py . . . . . . . . . . . . . . . . . . 1785
80.6 animation example code: dynamic_image.py . . . . . . . . . . . . . . . . . . . . . . . . . 1786
80.7 animation example code: dynamic_image2.py . . . . . . . . . . . . . . . . . . . . . . . . 1787

ix
80.8 animation example code: histogram.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1788
80.9 animation example code: moviewriter.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1789
80.10 animation example code: rain.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1790
80.11 animation example code: random_data.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1791
80.12 animation example code: simple_3danim.py . . . . . . . . . . . . . . . . . . . . . . . . . 1792
80.13 animation example code: simple_anim.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1793
80.14 animation example code: strip_chart_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 1794
80.15 animation example code: subplots.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1795
80.16 animation example code: unchained.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1797

81 api Examples 1801


81.1 api example code: agg_oo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1801
81.2 api example code: barchart_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1802
81.3 api example code: bbox_intersect.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1803
81.4 api example code: collections_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1805
81.5 api example code: colorbar_only.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1808
81.6 api example code: compound_path.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1810
81.7 api example code: custom_projection_example.py . . . . . . . . . . . . . . . . . . . . . . 1811
81.8 api example code: custom_scale_example.py . . . . . . . . . . . . . . . . . . . . . . . . . 1821
81.9 api example code: date_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1825
81.10 api example code: date_index_formatter.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1827
81.11 api example code: demo_affine_image.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1829
81.12 api example code: donut_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1831
81.13 api example code: engineering_formatter.py . . . . . . . . . . . . . . . . . . . . . . . . . 1833
81.14 api example code: filled_step.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1834
81.15 api example code: font_family_rc.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1838
81.16 api example code: font_file.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1839
81.17 api example code: histogram_path_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 1840
81.18 api example code: image_zcoord.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1842
81.19 api example code: joinstyle.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1843
81.20 api example code: legend_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1844
81.21 api example code: line_with_text.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1846
81.22 api example code: logo2.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1847
81.23 api example code: mathtext_asarray.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1850
81.24 api example code: patch_collection.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1851
81.25 api example code: power_norm_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1853
81.26 api example code: quad_bezier.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1854
81.27 api example code: radar_chart.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855
81.28 api example code: sankey_demo_basics.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1860
81.29 api example code: sankey_demo_links.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1864
81.30 api example code: sankey_demo_old.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1866
81.31 api example code: sankey_demo_rankine.py . . . . . . . . . . . . . . . . . . . . . . . . . 1871
81.32 api example code: scatter_piecharts.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1874
81.33 api example code: skewt.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1876
81.34 api example code: span_regions.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1882
81.35 api example code: two_scales.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1883
81.36 api example code: unicode_minus.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1885
81.37 api example code: watermark_image.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1886

x
81.38 api example code: watermark_text.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1887

82 axes_grid Examples 1889


82.1 axes_grid example code: demo_axes_divider.py . . . . . . . . . . . . . . . . . . . . . . . 1889
82.2 axes_grid example code: demo_axes_grid.py . . . . . . . . . . . . . . . . . . . . . . . . . 1892
82.3 axes_grid example code: demo_axes_grid2.py . . . . . . . . . . . . . . . . . . . . . . . . 1896
82.4 axes_grid example code: demo_axes_hbox_divider.py . . . . . . . . . . . . . . . . . . . . 1899
82.5 axes_grid example code: demo_axes_rgb.py . . . . . . . . . . . . . . . . . . . . . . . . . 1901
82.6 axes_grid example code: demo_axisline_style.py . . . . . . . . . . . . . . . . . . . . . . . 1904
82.7 axes_grid example code: demo_colorbar_with_inset_locator.py . . . . . . . . . . . . . . . 1905
82.8 axes_grid example code: demo_curvelinear_grid.py . . . . . . . . . . . . . . . . . . . . . 1906
82.9 axes_grid example code: demo_curvelinear_grid2.py . . . . . . . . . . . . . . . . . . . . . 1909
82.10 axes_grid example code: demo_edge_colorbar.py . . . . . . . . . . . . . . . . . . . . . . . 1911
82.11 axes_grid example code: demo_floating_axes.py . . . . . . . . . . . . . . . . . . . . . . . 1913
82.12 axes_grid example code: demo_floating_axis.py . . . . . . . . . . . . . . . . . . . . . . . 1916
82.13 axes_grid example code: demo_imagegrid_aspect.py . . . . . . . . . . . . . . . . . . . . . 1918
82.14 axes_grid example code: demo_parasite_axes2.py . . . . . . . . . . . . . . . . . . . . . . 1919
82.15 axes_grid example code: inset_locator_demo.py . . . . . . . . . . . . . . . . . . . . . . . 1921
82.16 axes_grid example code: inset_locator_demo2.py . . . . . . . . . . . . . . . . . . . . . . . 1922
82.17 axes_grid example code: make_room_for_ylabel_using_axesgrid.py . . . . . . . . . . . . . 1924
82.18 axes_grid example code: parasite_simple2.py . . . . . . . . . . . . . . . . . . . . . . . . . 1928
82.19 axes_grid example code: scatter_hist.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1930
82.20 axes_grid example code: simple_anchored_artists.py . . . . . . . . . . . . . . . . . . . . . 1932
82.21 axes_grid example code: simple_axesgrid.py . . . . . . . . . . . . . . . . . . . . . . . . . 1934
82.22 axes_grid example code: simple_axesgrid2.py . . . . . . . . . . . . . . . . . . . . . . . . 1935
82.23 axes_grid example code: simple_axisline4.py . . . . . . . . . . . . . . . . . . . . . . . . . 1936

83 color Examples 1939


83.1 color example code: color_cycle_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1939
83.2 color example code: colormaps_reference.py . . . . . . . . . . . . . . . . . . . . . . . . . 1941
83.3 color example code: named_colors.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1948

84 event_handling Examples 1951


84.1 event_handling example code: close_event.py . . . . . . . . . . . . . . . . . . . . . . . . . 1951
84.2 event_handling example code: data_browser.py . . . . . . . . . . . . . . . . . . . . . . . . 1951
84.3 event_handling example code: figure_axes_enter_leave.py . . . . . . . . . . . . . . . . . . 1953
84.4 event_handling example code: idle_and_timeout.py . . . . . . . . . . . . . . . . . . . . . 1954
84.5 event_handling example code: keypress_demo.py . . . . . . . . . . . . . . . . . . . . . . 1955
84.6 event_handling example code: lasso_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 1956
84.7 event_handling example code: legend_picking.py . . . . . . . . . . . . . . . . . . . . . . . 1957
84.8 event_handling example code: looking_glass.py . . . . . . . . . . . . . . . . . . . . . . . 1958
84.9 event_handling example code: path_editor.py . . . . . . . . . . . . . . . . . . . . . . . . . 1960
84.10 event_handling example code: pick_event_demo.py . . . . . . . . . . . . . . . . . . . . . 1963
84.11 event_handling example code: pick_event_demo2.py . . . . . . . . . . . . . . . . . . . . . 1966
84.12 event_handling example code: pipong.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1967
84.13 event_handling example code: poly_editor.py . . . . . . . . . . . . . . . . . . . . . . . . . 1972
84.14 event_handling example code: pong_gtk.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1976
84.15 event_handling example code: resample.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1976

xi
84.16 event_handling example code: test_mouseclicks.py . . . . . . . . . . . . . . . . . . . . . . 1978
84.17 event_handling example code: timers.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 1978
84.18 event_handling example code: trifinder_event_demo.py . . . . . . . . . . . . . . . . . . . 1979
84.19 event_handling example code: viewlims.py . . . . . . . . . . . . . . . . . . . . . . . . . . 1980
84.20 event_handling example code: zoom_window.py . . . . . . . . . . . . . . . . . . . . . . . 1982

85 images_contours_and_fields Examples 1985


85.1 images_contours_and_fields example code: contourf_log.py . . . . . . . . . . . . . . . . . 1985
85.2 images_contours_and_fields example code: image_demo.py . . . . . . . . . . . . . . . . . 1987
85.3 images_contours_and_fields example code: image_demo_clip_path.py . . . . . . . . . . . 1988
85.4 images_contours_and_fields example code: interpolation_methods.py . . . . . . . . . . . . 1989
85.5 images_contours_and_fields example code: interpolation_none_vs_nearest.py . . . . . . . 1990
85.6 images_contours_and_fields example code: pcolormesh_levels.py . . . . . . . . . . . . . . 1993
85.7 images_contours_and_fields example code: streamplot_demo_features.py . . . . . . . . . . 1995
85.8 images_contours_and_fields example code: streamplot_demo_masking.py . . . . . . . . . 1997
85.9 images_contours_and_fields example code: streamplot_demo_start_points.py . . . . . . . . 1998

86 lines_bars_and_markers Examples 2001


86.1 lines_bars_and_markers example code: barh_demo.py . . . . . . . . . . . . . . . . . . . . 2001
86.2 lines_bars_and_markers example code: fill_demo.py . . . . . . . . . . . . . . . . . . . . . 2002
86.3 lines_bars_and_markers example code: fill_demo_features.py . . . . . . . . . . . . . . . . 2003
86.4 lines_bars_and_markers example code: line_demo_dash_control.py . . . . . . . . . . . . . 2004
86.5 lines_bars_and_markers example code: line_styles_reference.py . . . . . . . . . . . . . . . 2005
86.6 lines_bars_and_markers example code: marker_fillstyle_reference.py . . . . . . . . . . . . 2007
86.7 lines_bars_and_markers example code: marker_reference.py . . . . . . . . . . . . . . . . . 2008
86.8 lines_bars_and_markers example code: scatter_with_legend.py . . . . . . . . . . . . . . . 2011

87 misc Examples 2013


87.1 misc example code: contour_manual.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2013
87.2 misc example code: font_indexing.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2014
87.3 misc example code: ftface_props.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2015
87.4 misc example code: image_thumbnail.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2016
87.5 misc example code: longshort.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2017
87.6 misc example code: multiprocess.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2018
87.7 misc example code: rasterization_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2020
87.8 misc example code: rc_traits.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2021
87.9 misc example code: rec_groupby_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2025
87.10 misc example code: rec_join_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2027
87.11 misc example code: sample_data_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2027
87.12 misc example code: svg_filter_line.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2028
87.13 misc example code: svg_filter_pie.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2030
87.14 misc example code: tight_bbox_test.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2031

88 mplot3d Examples 2033


88.1 mplot3d example code: 2dcollections3d_demo.py . . . . . . . . . . . . . . . . . . . . . . 2033
88.2 mplot3d example code: bars3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2034
88.3 mplot3d example code: contour3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2035
88.4 mplot3d example code: contour3d_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . . 2036

xii
88.5 mplot3d example code: contour3d_demo3.py . . . . . . . . . . . . . . . . . . . . . . . . . 2037
88.6 mplot3d example code: contourf3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2038
88.7 mplot3d example code: contourf3d_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . 2039
88.8 mplot3d example code: custom_shaded_3d_surface.py . . . . . . . . . . . . . . . . . . . . 2040
88.9 mplot3d example code: hist3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2042
88.10 mplot3d example code: lines3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2043
88.11 mplot3d example code: lorenz_attractor.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2044
88.12 mplot3d example code: mixed_subplots_demo.py . . . . . . . . . . . . . . . . . . . . . . 2046
88.13 mplot3d example code: offset_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2048
88.14 mplot3d example code: pathpatch3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2049
88.15 mplot3d example code: polys3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2051
88.16 mplot3d example code: quiver3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2052
88.17 mplot3d example code: rotate_axes3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2053
88.18 mplot3d example code: scatter3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2054
88.19 mplot3d example code: subplot3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2055
88.20 mplot3d example code: surface3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2057
88.21 mplot3d example code: surface3d_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . . 2058
88.22 mplot3d example code: surface3d_demo3.py . . . . . . . . . . . . . . . . . . . . . . . . . 2059
88.23 mplot3d example code: surface3d_radial_demo.py . . . . . . . . . . . . . . . . . . . . . . 2060
88.24 mplot3d example code: text3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2061
88.25 mplot3d example code: tricontour3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2063
88.26 mplot3d example code: tricontourf3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2064
88.27 mplot3d example code: trisurf3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2066
88.28 mplot3d example code: trisurf3d_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2067
88.29 mplot3d example code: wire3d_animation_demo.py . . . . . . . . . . . . . . . . . . . . . 2070
88.30 mplot3d example code: wire3d_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2071
88.31 mplot3d example code: wire3d_zero_stride.py . . . . . . . . . . . . . . . . . . . . . . . . 2074

89 pie_and_polar_charts Examples 2077


89.1 pie_and_polar_charts example code: pie_demo_features.py . . . . . . . . . . . . . . . . . 2077
89.2 pie_and_polar_charts example code: polar_bar_demo.py . . . . . . . . . . . . . . . . . . . 2080
89.3 pie_and_polar_charts example code: polar_scatter_demo.py . . . . . . . . . . . . . . . . . 2081

90 pylab_examples Examples 2083


90.1 pylab_examples example code: accented_text.py . . . . . . . . . . . . . . . . . . . . . . . 2083
90.2 pylab_examples example code: agg_buffer.py . . . . . . . . . . . . . . . . . . . . . . . . . 2084
90.3 pylab_examples example code: agg_buffer_to_array.py . . . . . . . . . . . . . . . . . . . . 2086
90.4 pylab_examples example code: alignment_test.py . . . . . . . . . . . . . . . . . . . . . . 2088
90.5 pylab_examples example code: anchored_artists.py . . . . . . . . . . . . . . . . . . . . . . 2090
90.6 pylab_examples example code: animation_demo.py . . . . . . . . . . . . . . . . . . . . . 2093
90.7 pylab_examples example code: annotation_demo.py . . . . . . . . . . . . . . . . . . . . . 2094
90.8 pylab_examples example code: annotation_demo2.py . . . . . . . . . . . . . . . . . . . . 2099
90.9 pylab_examples example code: annotation_demo3.py . . . . . . . . . . . . . . . . . . . . 2104
90.10 pylab_examples example code: anscombe.py . . . . . . . . . . . . . . . . . . . . . . . . . 2107
90.11 pylab_examples example code: arctest.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2109
90.12 pylab_examples example code: arrow_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2110
90.13 pylab_examples example code: arrow_simple_demo.py . . . . . . . . . . . . . . . . . . . 2117
90.14 pylab_examples example code: aspect_loglog.py . . . . . . . . . . . . . . . . . . . . . . . 2118

xiii
90.15 pylab_examples example code: axes_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2119
90.16 pylab_examples example code: axes_props.py . . . . . . . . . . . . . . . . . . . . . . . . 2120
90.17 pylab_examples example code: axes_zoom_effect.py . . . . . . . . . . . . . . . . . . . . . 2122
90.18 pylab_examples example code: axhspan_demo.py . . . . . . . . . . . . . . . . . . . . . . 2125
90.19 pylab_examples example code: axis_equal_demo.py . . . . . . . . . . . . . . . . . . . . . 2126
90.20 pylab_examples example code: bar_stacked.py . . . . . . . . . . . . . . . . . . . . . . . . 2128
90.21 pylab_examples example code: barb_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2129
90.22 pylab_examples example code: barchart_demo.py . . . . . . . . . . . . . . . . . . . . . . 2132
90.23 pylab_examples example code: barchart_demo2.py . . . . . . . . . . . . . . . . . . . . . . 2134
90.24 pylab_examples example code: barcode_demo.py . . . . . . . . . . . . . . . . . . . . . . 2138
90.25 pylab_examples example code: boxplot_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2139
90.26 pylab_examples example code: boxplot_demo2.py . . . . . . . . . . . . . . . . . . . . . . 2147
90.27 pylab_examples example code: boxplot_demo3.py . . . . . . . . . . . . . . . . . . . . . . 2150
90.28 pylab_examples example code: break.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2152
90.29 pylab_examples example code: broken_axis.py . . . . . . . . . . . . . . . . . . . . . . . . 2153
90.30 pylab_examples example code: broken_barh.py . . . . . . . . . . . . . . . . . . . . . . . . 2155
90.31 pylab_examples example code: centered_ticklabels.py . . . . . . . . . . . . . . . . . . . . 2156
90.32 pylab_examples example code: cohere_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2158
90.33 pylab_examples example code: color_by_yvalue.py . . . . . . . . . . . . . . . . . . . . . 2159
90.34 pylab_examples example code: color_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2160
90.35 pylab_examples example code: colorbar_tick_labelling_demo.py . . . . . . . . . . . . . . 2162
90.36 pylab_examples example code: colours.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2164
90.37 pylab_examples example code: contour_corner_mask.py . . . . . . . . . . . . . . . . . . . 2165
90.38 pylab_examples example code: contour_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2167
90.39 pylab_examples example code: contour_image.py . . . . . . . . . . . . . . . . . . . . . . 2175
90.40 pylab_examples example code: contour_label_demo.py . . . . . . . . . . . . . . . . . . . 2178
90.41 pylab_examples example code: contourf_demo.py . . . . . . . . . . . . . . . . . . . . . . 2182
90.42 pylab_examples example code: contourf_hatching.py . . . . . . . . . . . . . . . . . . . . . 2187
90.43 pylab_examples example code: coords_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2189
90.44 pylab_examples example code: coords_report.py . . . . . . . . . . . . . . . . . . . . . . . 2191
90.45 pylab_examples example code: csd_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2192
90.46 pylab_examples example code: cursor_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2193
90.47 pylab_examples example code: custom_cmap.py . . . . . . . . . . . . . . . . . . . . . . . 2197
90.48 pylab_examples example code: custom_figure_class.py . . . . . . . . . . . . . . . . . . . 2202
90.49 pylab_examples example code: custom_ticker1.py . . . . . . . . . . . . . . . . . . . . . . 2203
90.50 pylab_examples example code: customize_rc.py . . . . . . . . . . . . . . . . . . . . . . . 2204
90.51 pylab_examples example code: dashpointlabel.py . . . . . . . . . . . . . . . . . . . . . . . 2206
90.52 pylab_examples example code: data_helper.py . . . . . . . . . . . . . . . . . . . . . . . . 2207
90.53 pylab_examples example code: date_demo1.py . . . . . . . . . . . . . . . . . . . . . . . . 2209
90.54 pylab_examples example code: date_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . 2211
90.55 pylab_examples example code: date_demo_convert.py . . . . . . . . . . . . . . . . . . . . 2213
90.56 pylab_examples example code: date_demo_rrule.py . . . . . . . . . . . . . . . . . . . . . 2214
90.57 pylab_examples example code: date_index_formatter.py . . . . . . . . . . . . . . . . . . . 2216
90.58 pylab_examples example code: demo_agg_filter.py . . . . . . . . . . . . . . . . . . . . . . 2218
90.59 pylab_examples example code: demo_annotation_box.py . . . . . . . . . . . . . . . . . . 2225
90.60 pylab_examples example code: demo_bboximage.py . . . . . . . . . . . . . . . . . . . . . 2227
90.61 pylab_examples example code: demo_ribbon_box.py . . . . . . . . . . . . . . . . . . . . . 2229
90.62 pylab_examples example code: demo_text_path.py . . . . . . . . . . . . . . . . . . . . . . 2232

xiv
90.63 pylab_examples example code: demo_text_rotation_mode.py . . . . . . . . . . . . . . . . 2236
90.64 pylab_examples example code: demo_tight_layout.py . . . . . . . . . . . . . . . . . . . . 2238
90.65 pylab_examples example code: dolphin.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2248
90.66 pylab_examples example code: ellipse_collection.py . . . . . . . . . . . . . . . . . . . . . 2251
90.67 pylab_examples example code: ellipse_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2252
90.68 pylab_examples example code: ellipse_rotated.py . . . . . . . . . . . . . . . . . . . . . . 2253
90.69 pylab_examples example code: equal_aspect_ratio.py . . . . . . . . . . . . . . . . . . . . 2254
90.70 pylab_examples example code: errorbar_limits.py . . . . . . . . . . . . . . . . . . . . . . 2255
90.71 pylab_examples example code: errorbar_subsample.py . . . . . . . . . . . . . . . . . . . . 2257
90.72 pylab_examples example code: eventcollection_demo.py . . . . . . . . . . . . . . . . . . . 2259
90.73 pylab_examples example code: eventplot_demo.py . . . . . . . . . . . . . . . . . . . . . . 2261
90.74 pylab_examples example code: fancyarrow_demo.py . . . . . . . . . . . . . . . . . . . . . 2263
90.75 pylab_examples example code: fancybox_demo.py . . . . . . . . . . . . . . . . . . . . . . 2265
90.76 pylab_examples example code: fancybox_demo2.py . . . . . . . . . . . . . . . . . . . . . 2269
90.77 pylab_examples example code: fancytextbox_demo.py . . . . . . . . . . . . . . . . . . . . 2270
90.78 pylab_examples example code: figimage_demo.py . . . . . . . . . . . . . . . . . . . . . . 2271
90.79 pylab_examples example code: figlegend_demo.py . . . . . . . . . . . . . . . . . . . . . . 2273
90.80 pylab_examples example code: figure_title.py . . . . . . . . . . . . . . . . . . . . . . . . 2274
90.81 pylab_examples example code: fill_between_demo.py . . . . . . . . . . . . . . . . . . . . 2275
90.82 pylab_examples example code: fill_betweenx_demo.py . . . . . . . . . . . . . . . . . . . 2279
90.83 pylab_examples example code: fill_spiral.py . . . . . . . . . . . . . . . . . . . . . . . . . 2282
90.84 pylab_examples example code: finance_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2283
90.85 pylab_examples example code: finance_work2.py . . . . . . . . . . . . . . . . . . . . . . 2285
90.86 pylab_examples example code: findobj_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2290
90.87 pylab_examples example code: font_table_ttf.py . . . . . . . . . . . . . . . . . . . . . . . 2291
90.88 pylab_examples example code: fonts_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2293
90.89 pylab_examples example code: fonts_demo_kw.py . . . . . . . . . . . . . . . . . . . . . . 2296
90.90 pylab_examples example code: ganged_plots.py . . . . . . . . . . . . . . . . . . . . . . . 2298
90.91 pylab_examples example code: geo_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2300
90.92 pylab_examples example code: ginput_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2301
90.93 pylab_examples example code: ginput_manual_clabel.py . . . . . . . . . . . . . . . . . . 2301
90.94 pylab_examples example code: gradient_bar.py . . . . . . . . . . . . . . . . . . . . . . . . 2304
90.95 pylab_examples example code: griddata_demo.py . . . . . . . . . . . . . . . . . . . . . . 2305
90.96 pylab_examples example code: hatch_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2306
90.97 pylab_examples example code: hexbin_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2308
90.98 pylab_examples example code: hexbin_demo2.py . . . . . . . . . . . . . . . . . . . . . . 2309
90.99 pylab_examples example code: hist2d_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2311
90.100pylab_examples example code: hist2d_log_demo.py . . . . . . . . . . . . . . . . . . . . . 2312
90.101pylab_examples example code: hist_colormapped.py . . . . . . . . . . . . . . . . . . . . . 2313
90.102pylab_examples example code: histogram_percent_demo.py . . . . . . . . . . . . . . . . . 2314
90.103pylab_examples example code: hyperlinks.py . . . . . . . . . . . . . . . . . . . . . . . . . 2315
90.104pylab_examples example code: image_clip_path.py . . . . . . . . . . . . . . . . . . . . . 2316
90.105pylab_examples example code: image_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2317
90.106pylab_examples example code: image_demo2.py . . . . . . . . . . . . . . . . . . . . . . . 2318
90.107pylab_examples example code: image_interp.py . . . . . . . . . . . . . . . . . . . . . . . 2319
90.108pylab_examples example code: image_masked.py . . . . . . . . . . . . . . . . . . . . . . 2323
90.109pylab_examples example code: image_nonuniform.py . . . . . . . . . . . . . . . . . . . . 2325
90.110pylab_examples example code: image_origin.py . . . . . . . . . . . . . . . . . . . . . . . 2327

xv
90.111pylab_examples example code: image_slices_viewer.py . . . . . . . . . . . . . . . . . . . 2328
90.112pylab_examples example code: interp_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2330
90.113pylab_examples example code: invert_axes.py . . . . . . . . . . . . . . . . . . . . . . . . 2331
90.114pylab_examples example code: layer_images.py . . . . . . . . . . . . . . . . . . . . . . . 2332
90.115pylab_examples example code: leftventricle_bulleye.py . . . . . . . . . . . . . . . . . . . 2333
90.116pylab_examples example code: legend_demo2.py . . . . . . . . . . . . . . . . . . . . . . 2338
90.117pylab_examples example code: legend_demo3.py . . . . . . . . . . . . . . . . . . . . . . 2339
90.118pylab_examples example code: legend_demo4.py . . . . . . . . . . . . . . . . . . . . . . 2340
90.119pylab_examples example code: legend_demo5.py . . . . . . . . . . . . . . . . . . . . . . 2341
90.120pylab_examples example code: line_collection.py . . . . . . . . . . . . . . . . . . . . . . 2343
90.121pylab_examples example code: line_collection2.py . . . . . . . . . . . . . . . . . . . . . . 2345
90.122pylab_examples example code: load_converter.py . . . . . . . . . . . . . . . . . . . . . . 2346
90.123pylab_examples example code: loadrec.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2347
90.124pylab_examples example code: log_bar.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2349
90.125pylab_examples example code: log_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2350
90.126pylab_examples example code: log_test.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2351
90.127pylab_examples example code: logo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2352
90.128pylab_examples example code: major_minor_demo1.py . . . . . . . . . . . . . . . . . . . 2353
90.129pylab_examples example code: major_minor_demo2.py . . . . . . . . . . . . . . . . . . . 2355
90.130pylab_examples example code: manual_axis.py . . . . . . . . . . . . . . . . . . . . . . . . 2356
90.131pylab_examples example code: marker_path.py . . . . . . . . . . . . . . . . . . . . . . . . 2358
90.132pylab_examples example code: markevery_demo.py . . . . . . . . . . . . . . . . . . . . . 2359
90.133pylab_examples example code: masked_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2365
90.134pylab_examples example code: mathtext_demo.py . . . . . . . . . . . . . . . . . . . . . . 2366
90.135pylab_examples example code: mathtext_examples.py . . . . . . . . . . . . . . . . . . . . 2368
90.136pylab_examples example code: matplotlib_icon.py . . . . . . . . . . . . . . . . . . . . . . 2371
90.137pylab_examples example code: matshow.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2372
90.138pylab_examples example code: movie_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2374
90.139pylab_examples example code: mri_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2375
90.140pylab_examples example code: mri_with_eeg.py . . . . . . . . . . . . . . . . . . . . . . . 2376
90.141pylab_examples example code: multi_image.py . . . . . . . . . . . . . . . . . . . . . . . . 2378
90.142pylab_examples example code: multicolored_line.py . . . . . . . . . . . . . . . . . . . . . 2380
90.143pylab_examples example code: multiline.py . . . . . . . . . . . . . . . . . . . . . . . . . 2383
90.144pylab_examples example code: multipage_pdf.py . . . . . . . . . . . . . . . . . . . . . . . 2384
90.145pylab_examples example code: multiple_figs_demo.py . . . . . . . . . . . . . . . . . . . . 2385
90.146pylab_examples example code: multiple_yaxis_with_spines.py . . . . . . . . . . . . . . . 2387
90.147pylab_examples example code: nan_test.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2389
90.148pylab_examples example code: newscalarformatter_demo.py . . . . . . . . . . . . . . . . 2390
90.149pylab_examples example code: patheffect_demo.py . . . . . . . . . . . . . . . . . . . . . 2395
90.150pylab_examples example code: pcolor_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2397
90.151pylab_examples example code: pcolor_log.py . . . . . . . . . . . . . . . . . . . . . . . . . 2399
90.152pylab_examples example code: pcolor_small.py . . . . . . . . . . . . . . . . . . . . . . . 2400
90.153pylab_examples example code: pie_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . 2401
90.154pylab_examples example code: plotfile_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2403
90.155pylab_examples example code: polar_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2411
90.156pylab_examples example code: polar_legend.py . . . . . . . . . . . . . . . . . . . . . . . 2413
90.157pylab_examples example code: print_stdout.py . . . . . . . . . . . . . . . . . . . . . . . . 2414
90.158pylab_examples example code: psd_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2415

xvi
90.159pylab_examples example code: psd_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . 2416
90.160pylab_examples example code: psd_demo3.py . . . . . . . . . . . . . . . . . . . . . . . . 2418
90.161pylab_examples example code: psd_demo_complex.py . . . . . . . . . . . . . . . . . . . . 2419
90.162pylab_examples example code: pythonic_matplotlib.py . . . . . . . . . . . . . . . . . . . . 2421
90.163pylab_examples example code: quadmesh_demo.py . . . . . . . . . . . . . . . . . . . . . 2423
90.164pylab_examples example code: quiver_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2425
90.165pylab_examples example code: scatter_custom_symbol.py . . . . . . . . . . . . . . . . . . 2432
90.166pylab_examples example code: scatter_demo2.py . . . . . . . . . . . . . . . . . . . . . . . 2433
90.167pylab_examples example code: scatter_hist.py . . . . . . . . . . . . . . . . . . . . . . . . 2435
90.168pylab_examples example code: scatter_masked.py . . . . . . . . . . . . . . . . . . . . . . 2437
90.169pylab_examples example code: scatter_profile.py . . . . . . . . . . . . . . . . . . . . . . . 2438
90.170pylab_examples example code: scatter_star_poly.py . . . . . . . . . . . . . . . . . . . . . 2439
90.171pylab_examples example code: scatter_symbol.py . . . . . . . . . . . . . . . . . . . . . . 2440
90.172pylab_examples example code: set_and_get.py . . . . . . . . . . . . . . . . . . . . . . . . 2441
90.173pylab_examples example code: shading_example.py . . . . . . . . . . . . . . . . . . . . . 2444
90.174pylab_examples example code: shared_axis_across_figures.py . . . . . . . . . . . . . . . . 2447
90.175pylab_examples example code: shared_axis_demo.py . . . . . . . . . . . . . . . . . . . . 2449
90.176pylab_examples example code: simple_plot.py . . . . . . . . . . . . . . . . . . . . . . . . 2451
90.177pylab_examples example code: simple_plot_fps.py . . . . . . . . . . . . . . . . . . . . . . 2452
90.178pylab_examples example code: specgram_demo.py . . . . . . . . . . . . . . . . . . . . . . 2453
90.179pylab_examples example code: spectrum_demo.py . . . . . . . . . . . . . . . . . . . . . . 2455
90.180pylab_examples example code: spine_placement_demo.py . . . . . . . . . . . . . . . . . . 2456
90.181pylab_examples example code: spy_demos.py . . . . . . . . . . . . . . . . . . . . . . . . 2460
90.182pylab_examples example code: stackplot_demo.py . . . . . . . . . . . . . . . . . . . . . . 2461
90.183pylab_examples example code: stackplot_demo2.py . . . . . . . . . . . . . . . . . . . . . 2463
90.184pylab_examples example code: stem_plot.py . . . . . . . . . . . . . . . . . . . . . . . . . 2464
90.185pylab_examples example code: step_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2465
90.186pylab_examples example code: stix_fonts_demo.py . . . . . . . . . . . . . . . . . . . . . 2468
90.187pylab_examples example code: stock_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2470
90.188pylab_examples example code: subplot_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2471
90.189pylab_examples example code: subplot_toolbar.py . . . . . . . . . . . . . . . . . . . . . . 2472
90.190pylab_examples example code: subplots_adjust.py . . . . . . . . . . . . . . . . . . . . . . 2474
90.191pylab_examples example code: subplots_demo.py . . . . . . . . . . . . . . . . . . . . . . 2475
90.192pylab_examples example code: symlog_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2483
90.193pylab_examples example code: system_monitor.py . . . . . . . . . . . . . . . . . . . . . . 2484
90.194pylab_examples example code: table_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2486
90.195pylab_examples example code: tex_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . 2488
90.196pylab_examples example code: tex_unicode_demo.py . . . . . . . . . . . . . . . . . . . . 2489
90.197pylab_examples example code: text_handles.py . . . . . . . . . . . . . . . . . . . . . . . . 2490
90.198pylab_examples example code: text_rotation.py . . . . . . . . . . . . . . . . . . . . . . . 2492
90.199pylab_examples example code: text_rotation_relative_to_line.py . . . . . . . . . . . . . . . 2494
90.200pylab_examples example code: titles_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2495
90.201pylab_examples example code: toggle_images.py . . . . . . . . . . . . . . . . . . . . . . . 2496
90.202pylab_examples example code: transoffset.py . . . . . . . . . . . . . . . . . . . . . . . . . 2499
90.203pylab_examples example code: tricontour_demo.py . . . . . . . . . . . . . . . . . . . . . 2501
90.204pylab_examples example code: tricontour_smooth_delaunay.py . . . . . . . . . . . . . . . 2505
90.205pylab_examples example code: tricontour_smooth_user.py . . . . . . . . . . . . . . . . . . 2508
90.206pylab_examples example code: tricontour_vs_griddata.py . . . . . . . . . . . . . . . . . . 2510

xvii
90.207pylab_examples example code: trigradient_demo.py . . . . . . . . . . . . . . . . . . . . . 2512
90.208pylab_examples example code: triinterp_demo.py . . . . . . . . . . . . . . . . . . . . . . 2514
90.209pylab_examples example code: tripcolor_demo.py . . . . . . . . . . . . . . . . . . . . . . 2516
90.210pylab_examples example code: triplot_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2521
90.211pylab_examples example code: usetex_baseline_test.py . . . . . . . . . . . . . . . . . . . 2525
90.212pylab_examples example code: usetex_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2527
90.213pylab_examples example code: usetex_fonteffects.py . . . . . . . . . . . . . . . . . . . . . 2529
90.214pylab_examples example code: vline_hline_demo.py . . . . . . . . . . . . . . . . . . . . . 2530
90.215pylab_examples example code: webapp_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2531
90.216pylab_examples example code: xcorr_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2533
90.217pylab_examples example code: zorder_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2534

91 scales Examples 2537


91.1 scales example code: scales.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2537

92 shapes_and_collections Examples 2539


92.1 shapes_and_collections example code: artist_reference.py . . . . . . . . . . . . . . . . . . 2539
92.2 shapes_and_collections example code: path_patch_demo.py . . . . . . . . . . . . . . . . . 2542
92.3 shapes_and_collections example code: scatter_demo.py . . . . . . . . . . . . . . . . . . . 2543

93 showcase Examples 2545


93.1 showcase example code: bachelors_degrees_by_gender.py . . . . . . . . . . . . . . . . . . 2546
93.2 showcase example code: integral_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2549
93.3 showcase example code: xkcd.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2551

94 specialty_plots Examples 2555


94.1 specialty_plots example code: advanced_hillshading.py . . . . . . . . . . . . . . . . . . . 2555
94.2 specialty_plots example code: hinton_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2558
94.3 specialty_plots example code: topographic_hillshading.py . . . . . . . . . . . . . . . . . . 2560

95 statistics Examples 2563


95.1 statistics example code: boxplot_color_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2563
95.2 statistics example code: boxplot_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2565
95.3 statistics example code: boxplot_vs_violin_demo.py . . . . . . . . . . . . . . . . . . . . . 2568
95.4 statistics example code: bxp_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2570
95.5 statistics example code: errorbar_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2573
95.6 statistics example code: errorbar_demo_features.py . . . . . . . . . . . . . . . . . . . . . . 2574
95.7 statistics example code: errorbar_limits.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2576
95.8 statistics example code: histogram_demo_cumulative.py . . . . . . . . . . . . . . . . . . . 2578
95.9 statistics example code: histogram_demo_features.py . . . . . . . . . . . . . . . . . . . . 2579
95.10 statistics example code: histogram_demo_histtypes.py . . . . . . . . . . . . . . . . . . . . 2580
95.11 statistics example code: histogram_demo_multihist.py . . . . . . . . . . . . . . . . . . . . 2582
95.12 statistics example code: multiple_histograms_side_by_side.py . . . . . . . . . . . . . . . . 2583
95.13 statistics example code: violinplot_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2585

96 style_sheets Examples 2587


96.1 style_sheets example code: plot_bmh.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2587
96.2 style_sheets example code: plot_dark_background.py . . . . . . . . . . . . . . . . . . . . 2588
96.3 style_sheets example code: plot_fivethirtyeight.py . . . . . . . . . . . . . . . . . . . . . . 2589

xviii
96.4 style_sheets example code: plot_ggplot.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2590
96.5 style_sheets example code: plot_grayscale.py . . . . . . . . . . . . . . . . . . . . . . . . . 2592

97 subplots_axes_and_figures Examples 2595


97.1 subplots_axes_and_figures example code: fahrenheit_celsius_scales.py . . . . . . . . . . . 2595
97.2 subplots_axes_and_figures example code: subplot_demo.py . . . . . . . . . . . . . . . . . 2597

98 tests Examples 2599


98.1 tests example code: backend_driver.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2599

99 text_labels_and_annotations Examples 2611


99.1 text_labels_and_annotations example code: autowrap_demo.py . . . . . . . . . . . . . . . 2611
99.2 text_labels_and_annotations example code: rainbow_text.py . . . . . . . . . . . . . . . . . 2612
99.3 text_labels_and_annotations example code: text_demo_fontdict.py . . . . . . . . . . . . . 2614
99.4 text_labels_and_annotations example code: unicode_demo.py . . . . . . . . . . . . . . . . 2615

100ticks_and_spines Examples 2617


100.1 ticks_and_spines example code: spines_demo.py . . . . . . . . . . . . . . . . . . . . . . . 2617
100.2 ticks_and_spines example code: spines_demo_bounds.py . . . . . . . . . . . . . . . . . . 2619
100.3 ticks_and_spines example code: spines_demo_dropped.py . . . . . . . . . . . . . . . . . . 2620
100.4 ticks_and_spines example code: tick_labels_from_values.py . . . . . . . . . . . . . . . . . 2621
100.5 ticks_and_spines example code: ticklabels_demo_rotation.py . . . . . . . . . . . . . . . . 2623

101units Examples 2625


101.1 units example code: annotate_with_units.py . . . . . . . . . . . . . . . . . . . . . . . . . . 2625
101.2 units example code: artist_tests.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2626
101.3 units example code: bar_demo2.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2628
101.4 units example code: bar_unit_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2629
101.5 units example code: basic_units.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2630
101.6 units example code: ellipse_with_units.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2638
101.7 units example code: evans_test.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2641
101.8 units example code: radian_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2643
101.9 units example code: units_sample.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2645
101.10units example code: units_scatter.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2646

102user_interfaces Examples 2649


102.1 user_interfaces example code: embedding_in_gtk.py . . . . . . . . . . . . . . . . . . . . . 2649
102.2 user_interfaces example code: embedding_in_gtk2.py . . . . . . . . . . . . . . . . . . . . 2650
102.3 user_interfaces example code: embedding_in_gtk3.py . . . . . . . . . . . . . . . . . . . . 2651
102.4 user_interfaces example code: embedding_in_gtk3_panzoom.py . . . . . . . . . . . . . . . 2651
102.5 user_interfaces example code: embedding_in_qt4.py . . . . . . . . . . . . . . . . . . . . . 2652
102.6 user_interfaces example code: embedding_in_qt4_wtoolbar.py . . . . . . . . . . . . . . . . 2655
102.7 user_interfaces example code: embedding_in_qt5.py . . . . . . . . . . . . . . . . . . . . . 2657
102.8 user_interfaces example code: embedding_in_tk.py . . . . . . . . . . . . . . . . . . . . . . 2660
102.9 user_interfaces example code: embedding_in_tk2.py . . . . . . . . . . . . . . . . . . . . . 2661
102.10user_interfaces example code: embedding_in_tk_canvas.py . . . . . . . . . . . . . . . . . 2662
102.11user_interfaces example code: embedding_in_wx2.py . . . . . . . . . . . . . . . . . . . . 2663
102.12user_interfaces example code: embedding_in_wx3.py . . . . . . . . . . . . . . . . . . . . 2665
102.13user_interfaces example code: embedding_in_wx4.py . . . . . . . . . . . . . . . . . . . . 2668

xix
102.14user_interfaces example code: embedding_in_wx5.py . . . . . . . . . . . . . . . . . . . . 2670
102.15user_interfaces example code: embedding_webagg.py . . . . . . . . . . . . . . . . . . . . 2672
102.16user_interfaces example code: fourier_demo_wx.py . . . . . . . . . . . . . . . . . . . . . 2676
102.17user_interfaces example code: gtk_spreadsheet.py . . . . . . . . . . . . . . . . . . . . . . 2681
102.18user_interfaces example code: histogram_demo_canvasagg.py . . . . . . . . . . . . . . . . 2683
102.19user_interfaces example code: interactive.py . . . . . . . . . . . . . . . . . . . . . . . . . 2684
102.20user_interfaces example code: interactive2.py . . . . . . . . . . . . . . . . . . . . . . . . . 2689
102.21user_interfaces example code: lineprops_dialog_gtk.py . . . . . . . . . . . . . . . . . . . . 2697
102.22user_interfaces example code: mathtext_wx.py . . . . . . . . . . . . . . . . . . . . . . . . 2697
102.23user_interfaces example code: mpl_with_glade.py . . . . . . . . . . . . . . . . . . . . . . 2700
102.24user_interfaces example code: mpl_with_glade_316.py . . . . . . . . . . . . . . . . . . . . 2702
102.25user_interfaces example code: pylab_with_gtk.py . . . . . . . . . . . . . . . . . . . . . . 2703
102.26user_interfaces example code: rec_edit_gtk_custom.py . . . . . . . . . . . . . . . . . . . . 2704
102.27user_interfaces example code: rec_edit_gtk_simple.py . . . . . . . . . . . . . . . . . . . . 2705
102.28user_interfaces example code: svg_histogram.py . . . . . . . . . . . . . . . . . . . . . . . 2705
102.29user_interfaces example code: svg_tooltip.py . . . . . . . . . . . . . . . . . . . . . . . . . 2708
102.30user_interfaces example code: toolmanager.py . . . . . . . . . . . . . . . . . . . . . . . . 2711
102.31user_interfaces example code: wxcursor_demo.py . . . . . . . . . . . . . . . . . . . . . . 2713

103widgets Examples 2715


103.1 widgets example code: buttons.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2715
103.2 widgets example code: check_buttons.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2716
103.3 widgets example code: cursor.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2716
103.4 widgets example code: lasso_selector_demo.py . . . . . . . . . . . . . . . . . . . . . . . . 2717
103.5 widgets example code: menu.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2719
103.6 widgets example code: multicursor.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2722
103.7 widgets example code: radio_buttons.py . . . . . . . . . . . . . . . . . . . . . . . . . . . 2723
103.8 widgets example code: rectangle_selector.py . . . . . . . . . . . . . . . . . . . . . . . . . 2724
103.9 widgets example code: slider_demo.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2725
103.10widgets example code: span_selector.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2726

XI Glossary 2729

Bibliography 2733

Python Module Index 2735

Index 2737

xx
Part I

Default Style Changes

1
CHAPTER

ONE

COLORMAP

matplotlib is changing the default colormap and styles in the upcoming 2.0 release!
The new default color map will be ‘viridis’ (aka option D). For an introduction to color theory and how
‘viridis’ was generated watch Nathaniel Smith and Stéfan van der Walt’s talk from SciPy2015
All four color maps will be included in matplotlib 1.5.

3
Matplotlib, Release 1.5.1

4 Chapter 1. Colormap
CHAPTER

TWO

EVERYTHING ELSE

We have collected proposals to change any and all visual defaults (including adding new rcParams as
needed).
Michael Droettboom and Thomas Caswell will decide on the new default styles to appear in the upcoming
2.0 release.
A ‘classic’ style sheet will be provided so reverting to the 1.x default values will be a single line of python
(mpl.style.use(’classic’)).

5
Matplotlib, Release 1.5.1

6 Chapter 2. Everything Else


Part II

User’s Guide

7
CHAPTER

THREE

INTRODUCTION

matplotlib is a library for making 2D plots of arrays in Python. Although it has its origins in emulating the
MATLAB® 1 graphics commands, it is independent of MATLAB, and can be used in a Pythonic, object
oriented way. Although matplotlib is written primarily in pure Python, it makes heavy use of NumPy and
other extension code to provide good performance even for large arrays.
matplotlib is designed with the philosophy that you should be able to create simple plots with just a few
commands, or just one! If you want to see a histogram of your data, you shouldn’t need to instantiate
objects, call methods, set properties, and so on; it should just work.
For years, I used to use MATLAB exclusively for data analysis and visualization. MATLAB excels at mak-
ing nice looking plots easy. When I began working with EEG data, I found that I needed to write applications
to interact with my data, and developed an EEG analysis application in MATLAB. As the application grew
in complexity, interacting with databases, http servers, manipulating complex data structures, I began to
strain against the limitations of MATLAB as a programming language, and decided to start over in Python.
Python more than makes up for all of MATLAB’s deficiencies as a programming language, but I was having
difficulty finding a 2D plotting package (for 3D VTK more than exceeds all of my needs).
When I went searching for a Python plotting package, I had several requirements:
• Plots should look great - publication quality. One important requirement for me is that the text looks
good (antialiased, etc.)
• Postscript output for inclusion with TeX documents
• Embeddable in a graphical user interface for application development
• Code should be easy enough that I can understand it and extend it
• Making plots should be easy
Finding no package that suited me just right, I did what any self-respecting Python programmer would do:
rolled up my sleeves and dived in. Not having any real experience with computer graphics, I decided to
emulate MATLAB’s plotting capabilities because that is something MATLAB does very well. This had the
added advantage that many people have a lot of MATLAB experience, and thus they can quickly get up to
steam plotting in python. From a developer’s perspective, having a fixed user interface (the pylab interface)
has been very useful, because the guts of the code base can be redesigned without affecting user code.
The matplotlib code is conceptually divided into three parts: the pylab interface is the set of functions
provided by matplotlib.pylab which allow the user to create plots with code quite similar to MATLAB
1
MATLAB is a registered trademark of The MathWorks, Inc.

9
Matplotlib, Release 1.5.1

figure generating code (Pyplot tutorial). The matplotlib frontend or matplotlib API is the set of classes that
do the heavy lifting, creating and managing figures, text, lines, plots and so on (Artist tutorial). This is an
abstract interface that knows nothing about output. The backends are device-dependent drawing devices, aka
renderers, that transform the frontend representation to hardcopy or a display device (What is a backend?).
Example backends: PS creates PostScript® hardcopy, SVG creates Scalable Vector Graphics hardcopy,
Agg creates PNG output using the high quality Anti-Grain Geometry library that ships with matplotlib,
GTK embeds matplotlib in a Gtk+ application, GTKAgg uses the Anti-Grain renderer to create a figure and
embed it in a Gtk+ application, and so on for PDF, WxWidgets, Tkinter, etc.
matplotlib is used by many people in many different contexts. Some people want to automatically generate
PostScript files to send to a printer or publishers. Others deploy matplotlib on a web application server to
generate PNG output for inclusion in dynamically-generated web pages. Some use matplotlib interactively
from the Python shell in Tkinter on Windows™. My primary use is to embed matplotlib in a Gtk+ EEG
application that runs on Windows, Linux and Macintosh OS X.

10 Chapter 3. Introduction
CHAPTER

FOUR

CONFIGURATION GUIDE

4.1 Installing

There are many different ways to install matplotlib, and the best way depends on what operating system you
are using, what you already have installed, and how you want to use it. To avoid wading through all the
details (and potential complications) on this page, there are several convenient options.

4.1.1 Installing pre-built packages

Most platforms : scientific Python distributions

The first option is to use one of the pre-packaged python distributions that already provide matplotlib built-in.
The Continuum.io Python distribution (Anaconda or miniconda) and the Enthought distribution (Canopy)
are both excellent choices that “just work” out of the box for Windows, OSX and common Linux platforms.
Both of these distributions include matplotlib and lots of other useful tools. Another excellent alternative
for Windows users is Python (x, y) .

Linux : using your package manager

If you are on Linux, you might prefer to use your package manager. matplotlib is packaged for almost every
major Linux distribution.
• Debian / Ubuntu : sudo apt-get install python-matplotlib
• Fedora / Redhat : sudo yum install python-matplotlib

Mac OSX : using pip

If you are on Mac OSX you can probably install matplotlib binaries using the standard Python installation
program pip. See Installing OSX binary wheels.

11
Matplotlib, Release 1.5.1

Windows

If you don’t already have Python installed, we recommend using one of the scipy-stack compatible Python
distributions such as WinPython, Python(x,y), Enthought Canopy, or Continuum Anaconda, which have
matplotlib and many of its dependencies, plus other useful packages, preinstalled.
For standard Python installations you will also need to install compatible versions of setuptools, numpy,
python-dateutil, pytz, pyparsing, and cycler in addition to matplotlib.
For Python 3.5 the Visual C++ Redistributable for Visual Studio 2015 needs to be installed. In case Python
2.7 to 3.4 are not installed for all users (not the default), the Microsoft Visual C++ 2008 ( 64 bit or 32 bit for
Python 2.7 to 3.2) or Microsoft Visual C++ 2010 ( 64 bit or 32 bit for Python 3.3 and 3.4) redistributable
packages need to be installed.
Matplotlib depends on Pillow for reading and saving JPEG, BMP, and TIFF image files. Matplotlib requires
MiKTeX and GhostScript for rendering text with LaTeX. FFmpeg, avconv, mencoder, or ImageMagick are
required for the animation module.
The following backends should work out of the box: agg, tkagg, ps, pdf and svg. For other backends you
may need to install pycairo, PyQt4, PyQt5, PySide, wxPython, PyGTK, Tornado, or GhostScript.
TkAgg is probably the best backend for interactive use from the standard Python shell or IPython. It is
enabled as the default backend for the official binaries. GTK3 is not supported on Windows.
The Windows installers (*.exe) and wheels (*.whl) on the PyPI download page do not contain test
data or example code. If you want to try the many demos that come in the matplotlib source dis-
tribution, download the *.tar.gz file and look in the examples subdirectory. To run the test suite,
copy the libmatplotlibtests and libmpl_toolkitstests directories from the source distribution to
sys.prefixLibsite-packagesmatplotlib and sys.prefixLibsite-packagesmpl_toolkits re-
spectively, and install nose, mock, Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick,
and Inkscape.

4.1.2 Installing from source

If you are interested in contributing to matplotlib development, running the latest source code, or just like to
build everything yourself, it is not difficult to build matplotlib from source. Grab the latest tar.gz release file
from the PyPI files page, or if you want to develop matplotlib or just need the latest bugfixed version, grab
the latest git version Source install from git.
The standard environment variables CC, CXX, PKG_CONFIG are respected. This means you can set them if
your toolchain is prefixed. This may be used for cross compiling.
export CC=x86_64-pc-linux-gnu-gcc export CXX=x86_64-pc-linux-gnu-g++ export
PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config
Once you have satisfied the requirements detailed below (mainly python, numpy, libpng and freetype), you
can build matplotlib:
cd matplotlib
python setup.py build
python setup.py install

12 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

We provide a setup.cfg file that goes with setup.py which you can use to customize the build process. For
example, which default backend to use, whether some of the optional libraries that matplotlib ships with are
installed, and so on. This file will be particularly useful to those packaging matplotlib.
If you have installed prerequisites to nonstandard places and need to inform matplotlib where they are,
edit setupext.py and add the base dirs to the basedir dictionary entry for your sys.platform. e.g., if
the header to some required library is in /some/path/include/someheader.h, put /some/path in the
basedir list for your platform.

Build requirements

These are external packages which you will need to install before installing matplotlib. If you are building on
OSX, see Building on OSX. If you are building on Windows, see Building on Windows. If you are installing
dependencies with a package manager on Linux, you may need to install the development packages (look
for a “-dev” postfix) in addition to the libraries themselves.

Required Dependencies

python 2.7, 3.4, or 3.5 Download python.


numpy 1.6 (or later) array support for python (download numpy)
setuptools Setuptools provides extensions for python package installation.
dateutil 1.1 or later Provides extensions to python datetime handling. If using pip, easy_install or in-
stalling from source, the installer will attempt to download and install python_dateutil from PyPI.
pyparsing Required for matplotlib’s mathtext math rendering support. If using pip, easy_install or in-
stalling from source, the installer will attempt to download and install pyparsing from PyPI.
libpng 1.2 (or later) library for loading and saving PNG files (download). libpng requires zlib.
pytz Used to manipulate time-zone aware datetimes. http://pypi.python.org/pypi/pytz
freetype 2.3 or later library for reading true type font files.
cycler 0.9 or later Composable cycle class used for constructing style-cycles

Optional GUI framework

These are optional packages which you may want to install to use matplotlib with a user interface toolkit.
See What is a backend? for more details on the optional matplotlib backends and the capabilities they
provide.
tk 8.3 or later The TCL/Tk widgets library used by the TkAgg backend
pyqt 4.0 or later The Qt4 widgets library python wrappers for the Qt4Agg backend
pygtk 2.4 or later The python wrappers for the GTK widgets library for use with the GTK or GTKAgg
backend

4.1. Installing 13
Matplotlib, Release 1.5.1

wxpython 2.8 or later The python wrappers for the wx widgets library for use with the WX or WXAgg
backend

Optional external programs

ffmpeg/avconv or mencoder Required for the animation module to be save out put to movie formats.
ImageMagick Required for the animation module to be able to save to animated gif.

Optional dependencies

Pillow If Pillow is installed, matplotlib can read and write a larger selection of image file formats.
pkg-config A tool used to find required non-python libraries. This is not strictly required, but can make
installation go more smoothly if the libraries and headers are not in the expected locations.

Required libraries that ship with matplotlib

agg 2.4 The antigrain C++ rendering engine. matplotlib links against the agg template source statically, so
it will not affect anything on your system outside of matplotlib.
qhull 2012.1 A library for computing Delaunay triangulations.
ttconv truetype font utility
six 1.9.0 Python 2/3 compatibility library. Do not use this in third-party code.

Building on Linux

It is easiest to use your system package manager to install the dependencies.


If you are on Debian/Ubuntu, you can get all the dependencies required to build matplotlib with:
sudo apt-get build-dep python-matplotlib

If you are on Fedora/RedHat, you can get all the dependencies required to build matplotlib by first installing
yum-builddep and then running:
su -c "yum-builddep python-matplotlib"

This does not build matplotlib, but it does get the install the build dependencies, which will make building
from source easier.

Building on OSX

The build situation on OSX is complicated by the various places one can get the libpng and freetype re-
quirements (darwinports, fink, /usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and

14 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

the different OSX version (e.g., 10.4 and 10.5). We recommend that you build the way we do for the OSX
release: get the source from the tarball or the git repository and follow the instruction in README.osx.

Building on Windows

The Python shipped from http://www.python.org is compiled with Visual Studio 2008 for versions before 3.3
and Visual Studio 2010 for 3.3 and later. Python extensions are recommended to be compiled with the same
compiler. The .NET Framework 4.0 is required for MSBuild (you’ll likely have the requisite Framework
with Visual Studio). In addition to Visual Studio CMake is required for building libpng.
Since there is no canonical Windows package manager the build methods for freetype, zlib, libpng, tcl, & tk
source code are documented as a build script at matplotlib-winbuild.

4.2 Customizing matplotlib

4.2.1 Using style sheets

Style sheets provide a means for more specific and/or temporary configuration modifications, but in a re-
peatable and well-ordered manner. A style sheet is a file with the same syntax as the matplotlibrc file,
and when applied, it will override the matplotlibrc.
For more information and examples, see Customizing plots with style sheets.

4.2.2 Dynamic rc settings

You can also dynamically change the default rc settings in a python script or interactively from the python
shell. All of the rc settings are stored in a dictionary-like variable called matplotlib.rcParams, which is
global to the matplotlib package. rcParams can be modified directly, for example:
import matplotlib as mpl
mpl.rcParams['lines.linewidth'] = 2
mpl.rcParams['lines.color'] = 'r'

Matplotlib also provides a couple of convenience functions for modifying rc settings. The
matplotlib.rc() command can be used to modify multiple settings in a single group at once, using
keyword arguments:
import matplotlib as mpl
mpl.rc('lines', linewidth=2, color='r')

The matplotlib.rcdefaults() command will restore the standard matplotlib default settings.
There is some degree of validation when setting the values of rcParams, see matplotlib.rcsetup for
details.

4.2. Customizing matplotlib 15


Matplotlib, Release 1.5.1

4.2.3 The matplotlibrc file

matplotlib uses matplotlibrc configuration files to customize all kinds of properties, which we call rc
settings or rc parameters. You can control the defaults of almost every property in matplotlib: figure
size and dpi, line width, color and style, axes, axis and grid properties, text and font properties and so on.
matplotlib looks for matplotlibrc in four locations, in the following order:
1. matplotlibrc in the current working directory, usually used for specific customizations that you do
not want to apply elsewhere.
2. $MATPLOTLIBRC/matplotlibrc.
3. It next looks in a user-specific place, depending on your platform:
• On Linux, it looks in .config/matplotlib/matplotlibrc (or
$XDG_CONFIG_HOME/matplotlib/matplotlibrc) if you’ve customized your environ-
ment.
• On other platforms, it looks in .matplotlib/matplotlibrc.
See matplotlib configuration and cache directory locations.
4. INSTALL/matplotlib/mpl-data/matplotlibrc, where INSTALL is some-
thing like /usr/lib/python2.5/site-packages on Linux, and maybe
C:\Python25\Lib\site-packages on Windows. Every time you install matplotlib, this file
will be overwritten, so if you want your customizations to be saved, please move this file to your
user-specific matplotlib directory.
To display where the currently active matplotlibrc file was loaded from, one can do the following:
>>> import matplotlib
>>> matplotlib.matplotlib_fname()
'/home/foo/.config/matplotlib/matplotlibrc'

See below for a sample matplotlibrc file.

A sample matplotlibrc file

### MATPLOTLIBRC FORMAT

# This is a sample matplotlib configuration file - you can find a copy


# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overwritten in your next install.
# If you want to keep a permanent local copy that will not be
# overwritten, place it in the following location:
# unix/linux:
# $HOME/.config/matplotlib/matplotlibrc or
# $XDG_CONFIG_HOME/matplotlib/matplotlibrc (if $XDG_CONFIG_HOME is set)
# other platforms:
# $HOME/.matplotlib/matplotlibrc
#
# See http://matplotlib.org/users/customizing.html#the-matplotlibrc-file for

16 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

# more details on the paths which are checked for the configuration file.
#
# This file is best viewed in a editor which supports python mode
# syntax highlighting. Blank lines, or lines starting with a comment
# symbol, are ignored, as are trailing comments. Other lines must
# have the format
# key : val # optional comment
#
# Colors: for the color values below, you can either use - a
# matplotlib color string, such as r, k, or b - an rgb tuple, such as
# (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar
# grayscale intensity such as 0.75 - a legal html color name, e.g., red,
# blue, darkslategray

#### CONFIGURATION BEGINS HERE

# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo


# CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
# Template.
# You can also deploy your own backend outside of matplotlib by
# referring to the module name (which must be in the PYTHONPATH) as
# 'module://my_backend'.
backend : qt4agg

# If you are using the Qt4Agg backend, you can choose here
# to use the PyQt4 bindings or the newer PySide bindings to
# the underlying Qt4 toolkit.
#backend.qt4 : PyQt4 # PyQt4 | PySide

# Note that this can be overridden by the environment variable


# QT_API used by Enthought Tool Suite (ETS); valid values are
# "pyqt" and "pyside". The "pyqt" setting has the side effect of
# forcing the use of Version 2 API for QString and QVariant.

# The port to use for the web server in the WebAgg backend.
# webagg.port : 8888

# If webagg.port is unavailable, a number of other random ports will


# be tried until one that is available is found.
# webagg.port_retries : 50

# When True, open the webbrowser to the plot that is shown


# webagg.open_in_browser : True

# When True, the figures rendered in the nbagg backend are created with
# a transparent background.
# nbagg.transparent : True

# if you are running pyplot inside a GUI and your backend choice
# conflicts, we will automatically try to find a compatible one for
# you if backend_fallback is True
#backend_fallback: True

4.2. Customizing matplotlib 17


Matplotlib, Release 1.5.1

#interactive : False
#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated)
#timezone : UTC # a pytz timezone string, e.g., US/Central or Europe/Paris

# Where your matplotlib data lives if you installed to a non-default


# location. This is where the matplotlib fonts, bitmaps, etc reside
#datapath : /home/jdhunter/mpldata

### LINES
# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
# information on line properties.
#lines.linewidth : 1.0 # line width in points
#lines.linestyle : - # solid line
#lines.color : blue # has no affect on plot(); see axes.prop_cycle
#lines.marker : None # the default marker
#lines.markeredgewidth : 0.5 # the line width around the marker symbol
#lines.markersize : 6 # markersize, in points
#lines.dash_joinstyle : miter # miter|round|bevel
#lines.dash_capstyle : butt # butt|round|projecting
#lines.solid_joinstyle : miter # miter|round|bevel
#lines.solid_capstyle : projecting # butt|round|projecting
#lines.antialiased : True # render lines in antialiased (no jaggies)

#markers.fillstyle: full # full|left|right|bottom|top|none

### PATCHES
# Patches are graphical objects that fill 2D space, like polygons or
# circles. See
# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches
# information on patch properties
#patch.linewidth : 1.0 # edge width in points
#patch.facecolor : blue
#patch.edgecolor : black
#patch.antialiased : True # render patches in antialiased (no jaggies)

### FONT
#
# font properties used by text.Text. See
# http://matplotlib.org/api/font_manager_api.html for more
# information on font properties. The 6 font properties used for font
# matching are given below with their default values.
#
# The font.family property has five values: 'serif' (e.g., Times),
# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery),
# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of
# these font families has a default list of font names in decreasing
# order of priority associated with them. When text.usetex is False,
# font.family may also be one or more concrete font names.
#
# The font.style property has three values: normal (or roman), italic
# or oblique. The oblique style will be used for italic, if it is not
# present.

18 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

#
# The font.variant property has two values: normal or small-caps. For
# TrueType fonts, which are scalable fonts, small-caps is equivalent
# to using a font size of 'smaller', or about 83% of the current font
# size.
#
# The font.weight property has effectively 13 values: normal, bold,
# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as
# 400, and bold is 700. bolder and lighter are relative values with
# respect to the current weight.
#
# The font.stretch property has 11 values: ultra-condensed,
# extra-condensed, condensed, semi-condensed, normal, semi-expanded,
# expanded, extra-expanded, ultra-expanded, wider, and narrower. This
# property is not currently implemented.
#
# The font.size property is the default font size for text, given in pts.
# 12pt is the standard value.
#
#font.family : sans-serif
#font.style : normal
#font.variant : normal
#font.weight : medium
#font.stretch : normal
# note that font.size controls default text sizes. To configure
# special text sizes tick labels, axes, labels, title, etc, see the rc
# settings for axes and ticks. Special text sizes can be defined
# relative to font.size, using the following values: xx-small, x-small,
# small, medium, large, x-large, xx-large, larger, or smaller
#font.size : 12.0
#font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC B
#font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Ava
#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive
#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, fantasy
#font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed

### TEXT
# text properties used by text.Text. See
# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
# information on text properties

#text.color : black

### LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex


#text.usetex : False # use latex for all text handling. The following fonts
# are supported through the usual rc parameter settings:
# new century schoolbook, bookman, times, palatino,
# zapf chancery, charter, serif, sans-serif, helvetica,
# avant garde, courier, monospace, computer modern roman,
# computer modern sans serif, computer modern typewriter
# If another font is desired which can loaded using the
# LaTeX \usepackage command, please inquire at the
# matplotlib mailing list

4.2. Customizing matplotlib 19


Matplotlib, Release 1.5.1

#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling
# unicode strings.
#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
# preamble is a comma separated list of LaTeX statements
# that are included in the LaTeX document preamble.
# An example:
# text.latex.preamble : \usepackage{bm},\usepackage{euler}
# The following packages are always loaded with usetex, so
# beware of package collisions: color, geometry, graphicx,
# type1cm, textcomp. Adobe Postscript (PSSNFS) font packages
# may also be loaded, depending on your font settings

#text.dvipnghack : None # some versions of dvipng don't handle alpha


# channel properly. Use True to correct
# and flush ~/.matplotlib/tex.cache
# before testing and False to force
# correction off. None will try and
# guess based on your dvipng version

#text.hinting : auto # May be one of the following:


# 'none': Perform no hinting
# 'auto': Use freetype's autohinter
# 'native': Use the hinting information in the
# font file, if available, and if your
# freetype library supports it
# 'either': Use the native hinting information,
# or the autohinter if none is available.
# For backward compatibility, this value may also be
# True === 'auto' or False === 'none'.
#text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
# horizontal direction. A value of 1 will hint to full
# pixels. A value of 2 will hint to half pixels etc.

#text.antialiased : True # If True (default), the text will be antialiased.


# This only affects the Agg backend.

# The following settings allow you to select the fonts in math mode.
# They map from a TeX font name to a fontconfig font pattern.
# These settings are only used if mathtext.fontset is 'custom'.
# Note that this "custom" mode is unsupported and may go away in the
# future.
#mathtext.cal : cursive
#mathtext.rm : serif
#mathtext.tt : monospace
#mathtext.it : serif:italic
#mathtext.bf : serif:bold
#mathtext.sf : sans
#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
# 'stixsans' or 'custom'
#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern
# fonts when a symbol can not be found in one of

20 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

# the custom math fonts.

#mathtext.default : it # The default font to use for math.


# Can be any of the LaTeX font names, including
# the special name "regular" for the same font
# used in regular text.

### AXES
# default face and edge color, default tick sizes,
# default fontsizes for ticklabels, and so on. See
# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes
#axes.hold : True # whether to clear the axes by default on
#axes.facecolor : white # axes background color
#axes.edgecolor : black # axes edge color
#axes.linewidth : 1.0 # edge linewidth
#axes.grid : False # display grid or not
#axes.titlesize : large # fontsize of the axes title
#axes.labelsize : medium # fontsize of the x any y labels
#axes.labelpad : 5.0 # space between label and axis
#axes.labelweight : normal # weight of the x and y labels
#axes.labelcolor : black
#axes.axisbelow : False # whether axis gridlines and ticks are below
# the axes elements (lines, text, etc)

#axes.formatter.limits : -7, 7 # use scientific notation if log10


# of the axis range is smaller than the
# first or larger than the second
#axes.formatter.use_locale : False # When True, format tick labels
# according to the user's locale.
# For example, use ',' as a decimal
# separator in the fr_FR locale.
#axes.formatter.use_mathtext : False # When True, use mathtext for scientific
# notation.
#axes.formatter.useoffset : True # If True, the tick label formatter
# will default to labeling ticks relative
# to an offset when the data range is very
# small compared to the minimum absolute
# value of the data.

#axes.unicode_minus : True # use unicode for the minus symbol


# rather than hyphen. See
# http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
#axes.prop_cycle : cycler('color', 'bgrcmyk')
# color cycle for plot lines
# as list of string colorspecs:
# single letter, long name, or
# web-style hex
#axes.xmargin : 0 # x margin. See `axes.Axes.margins`
#axes.ymargin : 0 # y margin See `axes.Axes.margins`

#polaraxes.grid : True # display grid on polar axes


#axes3d.grid : True # display grid on 3d axes

4.2. Customizing matplotlib 21


Matplotlib, Release 1.5.1

### TICKS
# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
#xtick.major.size : 4 # major tick size in points
#xtick.minor.size : 2 # minor tick size in points
#xtick.major.width : 0.5 # major tick width in points
#xtick.minor.width : 0.5 # minor tick width in points
#xtick.major.pad : 4 # distance to major tick label in points
#xtick.minor.pad : 4 # distance to the minor tick label in points
#xtick.color : k # color of the tick labels
#xtick.labelsize : medium # fontsize of the tick labels
#xtick.direction : in # direction: in, out, or inout

#ytick.major.size : 4 # major tick size in points


#ytick.minor.size : 2 # minor tick size in points
#ytick.major.width : 0.5 # major tick width in points
#ytick.minor.width : 0.5 # minor tick width in points
#ytick.major.pad : 4 # distance to major tick label in points
#ytick.minor.pad : 4 # distance to the minor tick label in points
#ytick.color : k # color of the tick labels
#ytick.labelsize : medium # fontsize of the tick labels
#ytick.direction : in # direction: in, out, or inout

### GRIDS
#grid.color : black # grid color
#grid.linestyle : : # dotted
#grid.linewidth : 0.5 # in points
#grid.alpha : 1.0 # transparency, between 0.0 and 1.0

### Legend
#legend.fancybox : False # if True, use a rounded box for the
# legend, else a rectangle
#legend.isaxes : True
#legend.numpoints : 2 # the number of points in the legend line
#legend.fontsize : large
#legend.borderpad : 0.5 # border whitespace in fontsize units
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
# the following dimensions are in axes coords
#legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize
#legend.handlelength : 2. # the length of the legend lines in fraction of fontsize
#legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize
#legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsi
#legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize
#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize
#legend.shadow : False
#legend.frameon : True # whether or not to draw a frame around legend
#legend.framealpha : None # opacity of of legend frame
#legend.scatterpoints : 3 # number of scatter points

### FIGURE
# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
#figure.titlesize : medium # size of the figure title
#figure.titleweight : normal # weight of the figure title

22 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

#figure.figsize : 8, 6 # figure size in inches


#figure.dpi : 80 # figure dots per inch
#figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray
#figure.edgecolor : white # figure edgecolor
#figure.autolayout : False # When True, automatically adjust subplot
# parameters to make the plot fit the figure
#figure.max_open_warning : 20 # The maximum number of figures to open through
# the pyplot interface before emitting a warning.
# If less than one this feature is disabled.

# The figure subplot parameters. All dimensions are a fraction of the


# figure width or height
#figure.subplot.left : 0.125 # the left side of the subplots of the figure
#figure.subplot.right : 0.9 # the right side of the subplots of the figure
#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
#figure.subplot.top : 0.9 # the top of the subplots of the figure
#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots

### IMAGES
#image.aspect : equal # equal | auto | a number
#image.interpolation : bilinear # see help(imshow) for options
#image.cmap : jet # gray | jet etc...
#image.lut : 256 # the size of the colormap lookup table
#image.origin : upper # lower | upper
#image.resample : False
#image.composite_image : True # When True, all the images on a set of axes are
# combined into a single composite image before
# saving a figure as a vector graphics file,
# such as a PDF.

### CONTOUR PLOTS


#contour.negative_linestyle : dashed # dashed | solid
#contour.corner_mask : True # True | False | legacy

### ERRORBAR PLOTS


#errorbar.capsize : 3 # length of end cap on error bars in pixels

### Agg rendering


### Warning: experimental, 2008/10/10
#agg.path.chunksize : 0 # 0 to disable; values in the range
# 10000 to 100000 can improve speed slightly
# and prevent an Agg rendering failure
# when plotting very large data sets,
# especially if they are very gappy.
# It may cause minor artifacts, though.
# A value of 20000 is probably a good
# starting point.
### SAVING FIGURES
#path.simplify : True # When True, simplify paths by removing "invisible"
# points to reduce file size and increase rendering
# speed
#path.simplify_threshold : 0.1 # The threshold of similarity below which

4.2. Customizing matplotlib 23


Matplotlib, Release 1.5.1

# vertices will be removed in the simplification


# process
#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to
# the nearest pixel when certain criteria are met. When False,
# paths will never be snapped.
#path.sketch : None # May be none, or a 3-tuple of the form (scale, length,
# randomness).
# *scale* is the amplitude of the wiggle
# perpendicular to the line (in pixels). *length*
# is the length of the wiggle along the line (in
# pixels). *randomness* is the factor by which
# the length is randomly scaled.

# the default savefig params can be different from the display params
# e.g., you may want a higher resolution, or to make the figure
# background white
#savefig.dpi : 100 # figure dots per inch
#savefig.facecolor : white # figure facecolor when saving
#savefig.edgecolor : white # figure edgecolor when saving
#savefig.format : png # png, ps, pdf, svg
#savefig.bbox : standard # 'tight' or 'standard'.
# 'tight' is incompatible with pipe-based animation
# backends but will workd with temporary file based ones:
# e.g. setting animation.writer to ffmpeg will not work,
# use ffmpeg_file instead
#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight'
#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter.
#savefig.directory : ~ # default directory in savefig dialog box,
# leave empty to always use current working directory
#savefig.transparent : False # setting that controls whether figures are saved with a
# transparent background by default

# tk backend params
#tk.window_focus : False # Maintain shell focus for TkAgg

# ps backend params
#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10
#ps.useafm : False # use of afm fonts, results in small files
#ps.usedistiller : False # can be: None, ghostscript or xpdf
# Experimental: may produce smaller files.
# xpdf intended for production of publication quality files,
# but requires ghostscript, xpdf and ps2eps
#ps.distiller.res : 6000 # dpi
#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)

# pdf backend params


#pdf.compression : 6 # integer from 0 to 9
# 0 disables compression (good for debugging)
#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)

# svg backend params


#svg.image_inline : True # write raster image data directly into the svg file
#svg.image_noscale : False # suppress scaling of raster data embedded in SVG

24 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

#svg.fonttype : 'path' # How to handle SVG fonts:


# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
# 'path': Embed characters as paths -- supported by most SVG renderers
# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome,
# Opera and Safari

# docstring params
#docstring.hardcopy = False # set this when you want to generate hardcopy docstring

# Set the verbose flags. This controls how much information


# matplotlib gives you at runtime and where it goes. The verbosity
# levels are: silent, helpful, debug, debug-annoying. Any level is
# inclusive of all the levels below it. If your setting is "debug",
# you'll get all the debug and helpful messages. When submitting
# problems to the mailing-list, please set verbose to "helpful" or "debug"
# and paste the output into your report.
#
# The "fileo" gives the destination for any calls to verbose.report.
# These objects can a filename, or a filehandle like sys.stdout.
#
# You can override the rc default verbosity from the command line by
# giving the flags --verbose-LEVEL where LEVEL is one of the legal
# levels, e.g., --verbose-helpful.
#
# You can access the verbose instance in your code
# from matplotlib import verbose.
#verbose.level : silent # one of silent, helpful, debug, debug-annoying
#verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr

# Event keys to interact with figures/plots via keyboard.


# Customize these settings according to your needs.
# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')

#keymap.fullscreen : f # toggling
#keymap.home : h, r, home # home or reset mnemonic
#keymap.back : left, c, backspace # forward / backward keys to enable
#keymap.forward : right, v # left handed quick navigation
#keymap.pan : p # pan mnemonic
#keymap.zoom : o # zoom mnemonic
#keymap.save : s # saving current figure
#keymap.quit : ctrl+w, cmd+w # close the current figure
#keymap.grid : g # switching on/off a grid in current axes
#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear')
#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear')
#keymap.all_axes : a # enable all axes

# Control location of examples data files


#examples.directory : '' # directory to look in for custom installation

###ANIMATION settings
#animation.html : 'none' # How to display the animation as HTML in
# the IPython notebook. 'html5' uses
# HTML5 video tag.

4.2. Customizing matplotlib 25


Matplotlib, Release 1.5.1

#animation.writer : ffmpeg # MovieWriter 'backend' to use


#animation.codec : mpeg4 # Codec to use for writing movie
#animation.bitrate: -1 # Controls size/quality tradeoff for movie.
# -1 implies let utility auto-determine
#animation.frame_format: 'png' # Controls frame format used by temp files
#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path
# $PATH is searched
#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg
#animation.avconv_path: 'avconv' # Path to avconv binary. Without full path
# $PATH is searched
#animation.avconv_args: '' # Additional arguments to pass to avconv
#animation.mencoder_path: 'mencoder'
# Path to mencoder binary. Without full path
# $PATH is searched
#animation.mencoder_args: '' # Additional arguments to pass to mencoder
#animation.convert_path: 'convert' # Path to ImageMagick's convert binary.
# On Windows use the full path since convert
# is also the name of a system tool.

4.3 Using matplotlib in a python shell

By default, matplotlib defers drawing until the end of the script because drawing can be an expensive oper-
ation, and you may not want to update the plot every time a single property is changed, only once after all
the properties have changed.
But when working from the python shell, you usually do want to update the plot with every command, e.g.,
after changing the xlabel(), or the marker style of a line. While this is simple in concept, in practice it
can be tricky, because matplotlib is a graphical user interface application under the hood, and there are some
tricks to make the applications work right in a python shell.

4.3.1 IPython to the rescue

Note: The mode described here still exists for historical reasons, but it is highly advised not to use. It
pollutes namespaces with functions that will shadow python built-in and can lead to hard to track bugs.
To get IPython integration without imports the use of the %matplotlib magic is preferred. See ipython
documentation .

Fortunately, ipython, an enhanced interactive python shell, has figured out all of these tricks, and is mat-
plotlib aware, so when you start ipython in the pylab mode.
johnh@flag:~> ipython
Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
IPython 0.9.0 -- An enhanced Interactive Python.

In [1]: %pylab

Welcome to pylab, a matplotlib-based Python environment.


For more information, type 'help(pylab)'.

26 Chapter 4. Configuration Guide


Matplotlib, Release 1.5.1

In [2]: x = randn(10000)

In [3]: hist(x, 100)

it sets everything up for you so interactive plotting works as you would expect it to. Call figure() and a
figure window pops up, call plot() and your data appears in the figure window.
Note in the example above that we did not import any matplotlib names because in pylab mode, ipython will
import them automatically. ipython also turns on interactive mode for you, which causes every pyplot com-
mand to trigger a figure update, and also provides a matplotlib aware run command to run matplotlib scripts
efficiently. ipython will turn off interactive mode during a run command, and then restore the interactive
state at the end of the run so you can continue tweaking the figure manually.
There has been a lot of recent work to embed ipython, with pylab support, into various GUI applications, so
check on the ipython mailing list for the latest status.

4.3.2 Other python interpreters

If you can’t use ipython, and still want to use matplotlib/pylab from an interactive python shell, e.g., the
plain-ole standard python interactive interpreter, you are going to need to understand what a matplotlib
backend is What is a backend?.
With the TkAgg backend, which uses the Tkinter user interface toolkit, you can use matplotlib from an
arbitrary non-gui python shell. Just set your backend : TkAgg and interactive : True in your
matplotlibrc file (see Customizing matplotlib) and fire up python. Then:
>>> from pylab import *
>>> plot([1,2,3])
>>> xlabel('hi mom')

should work out of the box. This is also likely to work with recent versions of the qt4agg and gtkagg
backends, and with the macosx backend on the Macintosh. Note, in batch mode, i.e. when making figures
from scripts, interactive mode can be slow since it redraws the figure with each command. So you may want
to think carefully before making this the default behavior via the matplotlibrc file instead of using the
functions listed in the next section.
Gui shells are at best problematic, because they have to run a mainloop, but interactive plotting also involves
a mainloop. Ipython has sorted all this out for the primary matplotlib backends. There may be other shells
and IDEs that also work with matplotlib in interactive mode, but one obvious candidate does not: the python
IDLE IDE is a Tkinter gui app that does not support pylab interactive mode, regardless of backend.

4.3.3 Controlling interactive updating

The interactive property of the pyplot interface controls whether a figure canvas is drawn on every pyplot
command. If interactive is False, then the figure state is updated on every plot command, but will only be
drawn on explicit calls to draw(). When interactive is True, then every pyplot command triggers a draw.
The pyplot interface provides 4 commands that are useful for interactive control.
isinteractive() returns the interactive setting True|False

4.3. Using matplotlib in a python shell 27


Matplotlib, Release 1.5.1

ion() turns interactive mode on


ioff() turns interactive mode off
draw() forces a figure redraw
When working with a big figure in which drawing is expensive, you may want to turn matplotlib’s interactive
setting off temporarily to avoid the performance hit:
>>> #create big-expensive-figure
>>> ioff() # turn updates off
>>> title('now how much would you pay?')
>>> xticklabels(fontsize=20, color='green')
>>> draw() # force a draw
>>> savefig('alldone', dpi=300)
>>> close()
>>> ion() # turn updating back on
>>> plot(rand(20), mfc='g', mec='r', ms=40, mew=4, ls='--', lw=3)

28 Chapter 4. Configuration Guide


Other documents randomly have
different content
The Project Gutenberg eBook of Encyclopaedia
Britannica, 11th Edition, "Letter" to "Lightfoot,
John"
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Encyclopaedia Britannica, 11th Edition, "Letter" to "Lightfoot,


John"

Author: Various

Release date: December 6, 2012 [eBook #41567]


Most recently updated: October 23, 2024

Language: English

Credits: Produced by Marius Masi, Don Kretz and the Online


Distributed Proofreading Team at http://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK ENCYCLOPAEDIA


BRITANNICA, 11TH EDITION, "LETTER" TO "LIGHTFOOT, JOHN" ***
Transcriber’s note: A few typographical errors have been
corrected. They appear in the text like this,
and the explanation will appear when the
mouse pointer is moved over the marked
passage. Sections in Greek will yield a
transliteration when the pointer is moved
over them, and words using diacritic
characters in the Latin Extended Additional
block, which may not display in some fonts
or browsers, will display an unaccented
version.

Links to other EB articles: Links to articles


residing in other EB volumes will be made
available when the respective volumes are
introduced online.
THE ENCYCLOPÆDIA BRITANNICA
A DICTIONARY OF ARTS, SCIENCES,
LITERATURE AND GENERAL
INFORMATION
ELEVENTH EDITION

VOLUME XVI SLICE V

Letter to Lightfoot, John

Articles in This Slice

LETTER LIAS
LETTERKENNY LIBANIUS
LETTER OF CREDIT LIBATION
LETTERS PATENT LIBAU
LETTRES DE CACHET LIBEL and SLANDER
LETTUCE LIBELLATICI
LEUCADIA LIBER and LIBERA
LEUCIPPUS LIBERAL PARTY
LEUCITE LIBER DIURNUS ROMANORUM
PONTIFICUM
LEUCTRA LIBERIA
LEUK LIBERIUS
LEUTHEN LIBER PONTIFICALIS
LEUTZE, EMANUEL LIBERTAD
LEVALLOIS-PERRET LIBERTARIANISM
LEVANT LIBERTINES
LEVASSEUR, PIERRE EMILE LIBERTINES, SYNAGOGUE OF THE
LEVECHE LIBERTY
LEVÉE (river embankment) LIBERTY PARTY
LEVEE (reception) LIBITINA
LEVELLERS LIBMANAN
LEVEN, ALEXANDER LESLIE LIBO
LEVEN (Scotish burgh) LIBON
LEVEN, LOCH LIBOURNE
LEVEN AND MELVILLE, EARLS LIBRA
OF
LEVER, CHARLES JAMES LIBRARIES
LEVER LIBRATION
LEVERRIER, URBAIN JEAN LIBYA
JOSEPH
LEVERTIN, OSCAR IVAN LICATA
LEVI, HERMANN LICENCE
LEVI, LEONE LICHEN
LEVIATHAN LICHENS
LEVIRATE LICHFIELD
LÉVIS LICH-GATE
LEVITES LICHTENBERG, GEORG CHRISTOPH
LEVITICUS LICHTENBERG (German principality)
LEVY, AMY LICINIANUS, GRANIUS
LEVY, AUGUSTE MICHEL LICINIUS
LEVY (money raising) LICINIUS CALVUS STOLO, GAIUS
LEWALD, FANNY LICINIUS MACER CALVUS, GAIUS
LEWANIKA LICODIA EUBEA
LEWES, CHARLES LEE LICTORS
LEWES, GEORGE HENRY LIDDELL, HENRY GEORGE
LEWES (town of England) LIDDESDALE
LEWES (Delaware, U.S.A.) LIDDON, HENRY PARRY
LEWIS, SIR GEORGE LIE, JONAS LAURITZ EDEMIL
CORNEWALL
LEWIS, HENRY CARVILL LIE, MARIUS SOPHUS
LEWIS, JOHN FREDERICK LIEBER, FRANCIS
LEWIS, MATTHEW GREGORY LIEBERMANN, MAX
LEWIS, MERIWETHER LIEBIG, JUSTUS VON
LEWISBURG LIEBKNECHT, WILHELM
LEWISHAM LIECHTENSTEIN
LEWISTON LIÉGE (province of Belgium)
LEWIS-WITH-HARRIS LIÉGE (Belgian city)
LEXICON LIEGE (feudal term)
LEXINGTON, BARON LIEGNITZ
LEXINGTON (Kentucky, LIEN
U.S.A.)
LEXINGTON (Massachusetts, LIERRE
U.S.A.)
LEXINGTON (Missouri, U.S.A.) LIESTAL
LEXINGTON (Virginia, U.S.A.) LIEUTENANT
LEYDEN, JOHN LIFE
LEYDEN JAR LIFE-BOAT, and LIFE-SAVING
SERVICE
LEYS, HENDRIK LIFFORD
LEYTON LIGAMENT
LHASA LIGAO
L’HÔPITAL, MICHEL DE LIGHT
LIAO-YANG LIGHTFOOT, JOHN

LETTER (through Fr. lettre from Lat. littera or litera, letter of


the alphabet; the origin of the Latin word is obscure; it has probably
no connexion with the root of linere, to smear, i.e. with wax, for an
inscription with a stilus), a character or symbol expressing any one
of the elementary sounds into which a spoken word may be
analysed, one of the members of an alphabet. As applied to things
written, the word follows mainly the meanings of the Latin plural
litterae, the most common meaning attaching to the word being that
of a written communication from one person to another, an epistle
(q.v.). For the means adopted to secure the transmission of letters
see Post and Postal Service. The word is also, particularly in the
plural, applied to many legal and formal written documents, as in
letters patent, letters rogatory and dismissory, &c. The Latin use of
the plural is also followed in the employment of “letters” in the sense
of literature (q.v.) or learning.

LETTERKENNY, a market town of Co. Donegal, Ireland, 23


m. W. by S. of Londonderry by the Londonderry and Lough Swilly
and Letterkenny railway. Pop. (1901) 2370. It has a harbour at Port
Ballyrane, 1 m. distant on Lough Swilly. In the market square a
considerable trade in grain, flax and provisions is prosecuted. Rope-
making and shirt-making are industries. The handsome Roman
Catholic cathedral for the diocese of Raphoe occupies a commanding
site, and cost a large sum, as it contains carving from Rome, glass
from Munich and a pulpit of Irish and Carrara marble. It was
consecrated in 1901. There is a Catholic college dedicated to St
Ewnan. The town, which is governed by an urban district council, is
a centre for visitors to the county. Its name signifies the “hill of the
O’Cannanans,” a family who lorded over Tyrconnell before the rise of
the O’Donnells.
LETTER OF CREDIT, a letter, open or sealed, from a banker
or merchant, containing a request to some other person or firm to
advance the bearer of the letter, or some other person named
therein, upon the credit of the writer a particular or an unlimited
sum of money. A letter of credit is either general or special. It is
general when addressed to merchants or other persons in general,
requesting an advance to a third person, and special when
addressed to a particular person by name requesting him to make
such an advance. A letter of credit is not a negotiable instrument.
When a letter of credit is given for the purchase of goods, the letter
of credit usually states the particulars of the merchandise against
which bills are to be drawn, and shipping documents (bills of lading,
invoices, insurance policies) are usually attached to the draft for
acceptance.

LETTERS PATENT. It is a rule alike of common law and


sound policy that grants of freehold interests, franchises, liberties,
&c., by the sovereign to a subject should be made only after due
consideration, and in a form readily accessible to the public. These
ends are attained in England through the agency of that piece of
constitutional machinery known as “letters patent.” It is here
proposed to consider only the characteristics of letters patent
generally. The law relating to letters patent for inventions is dealt
with under the heading Patents.
Letters patent (litterae patentes) are letters addressed by the
sovereign “to all to whom these presents shall come,” reciting the
grant of some dignity, office, monopoly, franchise or other privilege
to the patentee. They are not sealed up, but are left open (hence
the term “patent”), and are recorded in the Patent Rolls in the
Record Office, or in the case of very recent grants, in the Chancery
Enrolment Office, so that all subjects of the realm may read and be
bound by their contents. In this respect they differ from certain
other letters of the sovereign directed to particular persons and for
particular purposes, which, not being proper for public inspection,
are closed up and sealed on the outside, and are thereupon called
writs close (litterae clausae) and are recorded in the Close Rolls.
Letters patent are used to put into commission various powers
inherent in the crown—legislative powers, as when the sovereign
entrusts to others the duty of opening parliament or assenting to
bills; judicial powers, e.g. of gaol delivery; executive powers, as
when the duties of Treasurer and Lord High Admiral are assigned to
commissioners of the Treasury and Admiralty (Anson, Const. ii. 47).
Letters patent are also used to incorporate bodies by charter—in the
British colonies, this mode of legislation is frequently applied to joint
stock companies (cf. Rev. Stats. Ontario, c. 191, s. 9)—to grant a
congé d’élire to a dean and chapter to elect a bishop, or licence to
convocation to amend canons; to grant pardon, and to confer certain
offices and dignities. Among grants of offices, &c., made by letters
patent the following may be enumerated: offices in the Heralds’
College; the dignities of a peer, baronet and knight bachelor; the
appointments of lord-lieutenant, custos rotulorum of counties, judge
of the High Court and Indian and Colonial judgeships, king’s counsel,
crown livings; the offices of attorney- and solicitor-general,
commander-in-chief, master of the horse, keeper of the privy seal,
postmaster-general, king’s printer; grants of separate courts of
quarter-sessions. The fees payable in respect of the grant of various
forms of letters patent are fixed by orders of the lord chancellor,
dated 20th of June 1871, 18th of July 1871 and 11th of Aug. 1881.
(These orders are set out at length in the Statutory Rules and
Orders Revised (ed. 1904), vol. ii. tit. “Clerk of the Crown in
Chancery,” pp. i. et seq.) Formerly each colonial governor was
appointed and commissioned by letters patent under the great seal
of the United Kingdom. But since 1875, the practice has been to
create the office of governor in each colony by letters patent, and
then to make each appointment to the office by commission under
the Royal Sign Manual and to give to the governor so appointed
instructions in a uniform shape under the Royal Sign Manual. The
letters patent, commission and instructions, are commonly described
as the Governor’s Commission (see Jenkyns, British Rule and
Jurisdiction beyond the Seas, p. 100; the forms now in use are
printed in Appx. iv. Also the Statutory Rules and Codes Revised, ed.
1904, under the title of the colony to which they relate). The
Colonial Letters Patent Act 1863 provides that letters patent shall not
take effect in the colonies or possessions beyond the seas until their
publication there by proclamation or otherwise (s. 2), and shall be
void unless so published within nine months in the case of colonies
east of Bengal or west of Cape Horn, and within six months in any
other case. Colonial officers and judges holding offices by patent for
life or for a term certain, are removable by a special procedure
—“amotion”—by the Governor and Council, subject to a right of
appeal to the king in Council (Leave of Absence Act, formerly cited
as “Burke’s Act” 1782; see Montagu v. Governor of Van Diemen’s
Land, 1849, 6 Moo. P.C. 491; Willis v. Gipps, 1846, 6 St. Trials [N.S.,
311]). The law of conquered or ceded colonies may be altered by
the crown by letters patent under the Great Seal as well as by
Proclamation or Order in Council (Jephson v. Riera, 1835, 3 Knapp,
130; 3 St. Trials [N.S.] 591).

Procedure.—Formerly letters patent were always granted under


the Great Seal. But now, under the Crown Office Act 1877, and the
Orders in Council made under it, many letters patent are sealed with
the wafer great seal. Letters patent for inventions are issued under
the seal of the Patent Office. The procedure by which letters patent
are obtained is as follows: A warrant for the issue of letters patent is
drawn up; and is signed by the lord chancellor; this is submitted to
the law officers of the crown, who countersign it; finally, the warrant
thus signed and countersigned is submitted to His Majesty, who
affixes his signature. The warrant is then sent to the Crown Office
and is filed, after it has been acted upon by the issue of letters
patent under the great or under the wafer seal as the case may be.
The letters patent are then delivered into the custody of those in
whose favour they are granted.

Construction.—The construction of letters patent differs from that


of other grants in certain particulars: (i.) Letters patent, contrary to
the ordinary rule, are construed in a sense favourable to the grantor
(viz. the crown) rather than to the grantee; although this rule is said
not to apply so strictly where the grant is made for consideration, or
where it purports to be made ex certâ scientiâ et mero motu. (ii.)
When it appears from the face of the grant that the sovereign has
been mistaken or deceived, either in matter of fact or in matter of
law, as, e.g. by false suggestion on the part of the patentee, or by
misrecital of former grants, or if the grant is contrary to law or
uncertain, the letters patent are absolutely void, and may still, it
would seem, be cancelled (except as regards letters patent for
inventions, which are revoked by a special procedure, regulated by §
26 of the Patents Act 1883), by the procedure known as scire facias,
an action brought against the patentee in the name of the crown
with the fiat of the attorney-general.

As to letters patent generally, see Bacon’s Abridgment


(“Prerogative,” F.); Chitty’s Prerogative; Hindmarsh on Patents
(1846); Anson, Law and Custom of the Const. ii. (3rd ed.,
Oxford and London, 1907-1908).
(A. W. R.)

LETTRES DE CACHET. Considered solely as French


documents, lettres de cachet may be defined as letters signed by the
king of France, countersigned by one of his ministers, and closed
with the royal seal (cachet). They contained an order—in principle,
any order whatsoever—emanating directly from the king, and
executory by himself. In the case of organized bodies lettres de
cachet were issued for the purpose of enjoining members to
assemble or to accomplish some definite act; the provincial estates
were convoked in this manner, and it was by a lettre de cachet
(called lettre de jussion) that the king ordered a parlement to
register a law in the teeth of its own remonstrances. The best-known
lettres de cachet, however, were those which may be called penal,
by which the king sentenced a subject without trial and without an
opportunity of defence to imprisonment in a state prison or an
ordinary gaol, confinement in a convent or a hospital, transportation
to the colonies, or relegation to a given place within the realm.

The power which the king exercised on these various occasions


was a royal privilege recognized by old French law, and can be
traced to a maxim which furnished a text of the Digest of Justinian:
“Rex solutus est a legibus.” This signified particularly that when the
king intervened directly in the administration proper, or in the
administration of justice, by a special act of his will, he could decide
without heeding the laws, and even in a sense contrary to the laws.
This was an early conception, and in early times the order in
question was simply verbal; thus some letters patent of Henry III. of
France in 1576 (Isambert, Anciennes lois françaises, xiv. 278) state
that François de Montmorency was “prisoner in our castle of the
Bastille in Paris by verbal command” of the late king Charles IX. But
in the 14th century the principle was introduced that the order
should be written, and hence arose the lettre de cachet. The lettre
de cachet belonged to the class of lettres closes, as opposed to
lettres patentes, which contained the expression of the legal and
permanent will of the king, and had to be furnished with the seal of
state affixed by the chancellor. The lettres de cachet, on the
contrary, were signed simply by a secretary of state (formerly known
as secrétaire des commandements) for the king; they bore merely
the imprint of the king’s privy seal, from which circumstance they
were often called, in the 14th and 15th centuries, lettres de petit
signet or lettres de petit cachet, and were entirely exempt from the
control of the chancellor.

While serving the government as a silent weapon against political


adversaries or dangerous writers and as a means of punishing
culprits of high birth without the scandal of a suit at law, the lettres
de cachet had many other uses. They were employed by the police
in dealing with prostitutes, and on their authority lunatics were shut
up in hospitals and sometimes in prisons. They were also often used
by heads of families as a means of correction, e.g. for protecting the
family honour from the disorderly or criminal conduct of sons; wives,
too, took advantage of them to curb the profligacy of husbands and
vice versa. They were issued by the intermediary on the advice of
the intendants in the provinces and of the lieutenant of police in
Paris. In reality, the secretary of state issued them in a completely
arbitrary fashion, and in most cases the king was unaware of their
issue. In the 18th century it is certain that the letters were often
issued blank, i.e. without containing the name of the person against
whom they were directed; the recipient, or mandatary, filled in the
name in order to make the letter effective.

Protests against the lettres de cachet were made continually by


the parlement of Paris and by the provincial parlements, and often
also by the States-General. In 1648 the sovereign courts of Paris
procured their momentary suppression in a kind of charter of
liberties which they imposed upon the crown, but which was
ephemeral. It was not until the reign of Louis XVI. that a reaction
against this abuse became clearly perceptible. At the beginning of
that reign Malesherbes during his short ministry endeavoured to
infuse some measure of justice into the system, and in March 1784
the baron de Breteuil, a minister of the king’s household, addressed
a circular to the intendants and the lieutenant of police with a view
to preventing the crying abuses connected with the issue of lettres
de cachet. In Paris, in 1779, the Cour des Aides demanded their
suppression, and in March 1788 the parlement of Paris made some
exceedingly energetic remonstrances, which are important for the
light they throw upon old French public law. The crown, however, did
not decide to lay aside this weapon, and in a declaration to the
States-General in the royal session of the 23rd of June 1789 (art. 15)
it did not renounce it absolutely. Lettres de cachet were abolished by
the Constituent Assembly, but Napoleon re-established their
equivalent by a political measure in the decree of the 9th of March
1801 on the state prisons. This was one of the acts brought up
against him by the sénatus-consulte of the 3rd of April 1814, which
pronounced his fall “considering that he has violated the
constitutional laws by the decrees on the state prisons.”

See Honoré Mirabeau, Les Lettres de cachet et des prisons


d’état (Hamburg, 1782), written in the dungeon at Vincennes
into which his father had thrown him by a lettre de cachet, one
of the ablest and most eloquent of his works, which had an
immense circulation and was translated into English with a
dedication to the duke of Norfolk in 1788; Frantz Funck-
Brentano, Les Lettres de cachet à Paris (Paris, 1904); and André
Chassaigne, Les Lettres de cachet sous l’ancien régime (Paris,
1903).
(J. P. E.)

LETTUCE, known botanically as Lactuca sativa (nat. ord.


Compositae), a hardy annual, highly esteemed as a salad plant. The
London market-gardeners make preparation for the first main crop
of Cos lettuces in the open ground early in August, a frame being set
on a shallow hotbed, and, the stimulus of heat not being required,
this is allowed to subside till the first week in October, when the soil,
consisting of leaf-mould mixed with a little sand, is put on 6 or 7 in.
thick, so that the surface is within 4½ in. of the sashes. The best
time for sowing is found to be about the 11th of October, one of the
best varieties being Lobjoits Green Cos. When the seeds begin to
germinate the sashes are drawn quite off in favourable weather
during the day, and put on, but tilted, at night in wet weather. Very
little watering is required, and the aim should be to keep the plants
gently moving till the days begin to lengthen. In January a more
active growth is encouraged, and in mild winters a considerable
extent of the planting out is done, but in private gardens the
preferable time would be February. The ground should be light and
rich, and well manured below, and the plants put out at 1 ft. apart
each way with the dibble. Frequent stirring of the ground with the
hoe greatly encourages the growth of the plants. A second sowing
should be made about the 5th of November, and a third in frames
about the end of January or beginning of February. In March a
sowing may be made in some warm situation out of doors;
successional sowings may be made in the open border about every
third or fourth week till August, about the middle of which month a
crop of Brown Cos, Hardy Hammersmith or Hardy White Cos should
be sown, the latter being the most reliable in a severe winter. These
plants may be put out early in October on the sides of ridges facing
the south or at the front of a south wall, beyond the reach of drops
from the copings, being planted 6 or 8 in. apart. Young lettuce
plants should be thinned out in the seed-beds before they crowd or
draw each other, and transplanted as soon as possible after two or
three leaves are formed. Some cultivators prefer that the summer
crops should not be transplanted, but sown where they are to stand,
the plants being merely thinned out; but transplanting checks the
running to seed, and makes the most of the ground.

For a winter supply by gentle forcing, the Hardy Hammersmith


and Brown Dutch Cabbage lettuces, and the Brown Cos and Green
Paris Cos lettuces, should be sown about the middle of August and
in the beginning of September, in rich light soil, the plants being
pricked out 3 in. apart in a prepared bed, as soon as the first two
leaves are fully formed. About the middle of October the plants
should be taken up carefully with balls attached to the roots, and
should be placed in a mild hotbed of well-prepared dung (about 55°)
covered about 1 ft. deep with a compost of sandy peat, leaf-mould
and a little well-decomposed manure. The Cos and Brown Dutch
varieties should be planted about 9 in. apart. Give plenty of air when
the weather permits, and protect from frost. For winter work
Stanstead Park Cabbage Lettuce is greatly favoured now by London
market-gardeners, as it stands the winter well. Lee’s Immense is
another good variety, while All the Year Round may be sown for
almost any season, but is better perhaps for summer crops.

There are two races of the lettuce, the Cos lettuce, with erect
oblong heads, and the Cabbage lettuce, with round or spreading
heads,—the former generally crisp, the latter soft and flabby in
texture. Some of the best lettuces for general purposes of the two
classes are the following:—

Cos: White Paris Cos, best for summer; Green Paris Cos, hardier
than the white; Brown Cos, Lobjoits Green Cos, one of the hardiest
and best for winter; Hardy White Cos.

Cabbage: Hammersmith Hardy Green; Stanstead Park, very hardy,


good for winter; Tom Thumb; Brown Dutch; Neapolitan, best for
summer; All the Year Round; Golden Ball, good for forcing in private
establishments.

Lactuca virosa, the strong-scented lettuce, contains an alkaloid


which has the power of dilating the pupil and may possibly be
identical with hyoscyamine, though this point is as yet not
determined. No variety of lettuce is now used for any medicinal
purpose, though there is probably some slight foundation for the
belief that the lettuce has faint narcotic properties.

LEUCADIA, the ancient name of one of the Ionian Islands,


now Santa Maura (q.v.), and of its chief town (Hamaxichi).

LEUCIPPUS, Greek philosopher, born at Miletus (or Elea),


founder of the Atomistic theory, contemporary of Zeno, Empedocles
and Anaxagoras. His fame was so completely overshadowed by that
of Democritus, who subsequently developed the theory into a
system, that his very existence was denied by Epicurus (Diog. Laërt.
x. 7), followed in modern times by E. Rohde. Epicurus, however,
distinguishes Leucippus from Democritus, and Aristotle and
Theophrastus expressly credit him with the invention of Atomism.
There seems, therefore, no reason to doubt his existence, although
nothing is known of his life, and even his birthplace is uncertain.
Between Leucippus and Democritus there is an interval of at least
forty years; accordingly, while the beginnings of Atomism are closely
connected with the doctrines of the Eleatics, the system as
developed by Democritus is conditioned by the sophistical views of
his time, especially those of Protagoras. While Leucippus’s notion of
Being agreed generally with that of the Eleatics, he postulated its
plurality (atoms) and motion, and the reality of not-Being (the void)
in which his atoms moved.

See Democritus. On the Rohde-Diels controversy as to the


existence of Leucippus, see F. Lortzing in Bursian’s Jahresbericht,
vol. cxvi. (1904); also J. Burnet, Early Greek Philosophy (1892).

LEUCITE, a rock-forming mineral composed of potassium and


aluminium metasilicate KAl(SiO3)2. Crystals have the form of cubic
icositetrahedra {211}, but, as first observed by Sir David Brewster in
1821, they are not optically isotropic, and are therefore pseudo-
cubic. Goniometric measurements made by G. vom Rath in 1873 led
him to refer the crystals to the tetragonal system, the faces o being
distinct from those lettered i in the
adjoining figure. Optical investigations
have since proved the crystals to be
still more complex in character, and to
consist of several orthorhombic or
monoclinic individuals, which are
optically biaxial and repeatedly
twinned, giving rise to twin-lamellae
and to striations on the faces. When
the crystals are raised to a
temperature of about 500° C. they become optically isotropic, the
twin-lamellae and striations disappearing, reappearing, however,
when the crystals are again cooled. This pseudo-cubic character of
leucite is exactly the same as that of the mineral boracite (q.v.).

The crystals are white (hence the name suggested by A. G.


Werner in 1791, from λευκός) or ash-grey in colour, and are usually
dull and opaque, but sometimes transparent and glassy; they are
brittle and break with a conchoidal fracture. The hardness is 5.5, and
the specific gravity 2.5. Enclosures of other minerals, arranged in
concentric zones, are frequently present in the crystals. On account
of the colour and form of the crystals the mineral was early known
as “white garnet.” French authors employ R. J. Haüy’s name
“amphigène.”
(L. J. S.)

Leucite Rocks.—Although rocks containing leucite are


numerically scarce, many countries such as England being
entirely without them, yet they are of wide distribution,
occurring in every quarter of the globe. Taken collectively, they
exhibit a considerable variety of types and are of great interest
petrographically. For the presence of this mineral it is necessary
that the silica percentage of the rock should not be high, for
leucite never occurs in presence of free quartz. It is most
common in lavas of recent and Tertiary age, which have a fair
amount of potash, or at any rate have potash equal to or greater
than soda; if soda preponderates nepheline occurs rather than
leucite. In pre-Tertiary rocks leucite is uncommon, since it readily
decomposes and changes to zeolites, analcite and other
secondary minerals. Leucite also is rare in plutonic rocks and
dike rocks, but leucite-syenite and leucite-tinguaite bear witness
to the possibility that it may occur in this manner. The rounded
shape of its crystals, their white or grey colour, and rough
cleavage, make the presence of leucite easily determinable in
many of these rocks by simple inspection, especially when the
crystals are large. “Pseudo-leucites” are rounded areas
consisting of felspar, nepheline, analcite, &c., which have the
shape, composition and sometimes even the crystalline forms of
leucite; they are probably pseudomorphs or paramorphs, which
have developed from leucite because this mineral, in its
isometric crystals, is not stable at ordinary temperatures and
may be expected under favourable conditions to undergo
spontaneous change into an aggregate of other minerals.
Leucite is very often accompanied by nepheline, sodalite or
nosean; other minerals which make their appearance with some
frequency are melanite, garnet and melilite.

The plutonic leucite-bearing rocks are leucite-syenite and


missourite. Of these the former consists of orthoclase,
nepheline, sodalite, diopside and aegirine, biotite and sphene.
Two occurrences are known, one in Arkansas, the other in
Sutherlandshire, Scotland. The Scottish rock has been called
borolanite. Both examples show large rounded spots in the hand
specimens; they are pseudo-leucites and under the microscope
prove to consist of orthoclase, nepheline, sodalite and
decomposition products. These have a radiate arrangement
externally, but are of irregular structure at their centres; it is
interesting to note that in both rocks melanite is an important
accessory. The missourites are more basic and consist of leucite,
olivine, augite and biotite; the leucite is partly fresh, partly
altered to analcite, and the rock has a spotted character
recalling that of the leucite-syenites. It has been found only in
the Highwood Mountains of Montana.

The leucite-bearing dike-rocks are members of the tinguaite


and monchiquite groups. The leucite-tinguaites are usually pale
grey or greenish in colour and consist principally of nepheline,
alkali-felspar and aegirine. The latter forms bright green moss-
like patches and growths of indefinite shape, or in other cases
scattered acicular prisms, among the felspars and nephelines of
the ground mass. Where leucite occurs, it is always eumorphic in
small, rounded, many-sided crystals in the ground mass, or in
larger masses which have the same characters as the pseudo-
leucites. Biotite occurs in some of these rocks, and melanite also
is present. Nepheline appears to decrease in amount as leucite
increases. Rocks of this group are known from Rio de Janeiro,
Arkansas, Kola (in Finland), Montana and a few other places. In
Greenland there are leucite-tinguaites with much arfvedsonite
(hornblende) and eudyalite. Wherever they occur they
accompany leucite- and nepheline-syenites. Leucite-
monchiquites are fine-grained dark rocks consisting of olivine,
titaniferous augite and iron oxides, with a glassy ground mass in
which small rounded crystals of leucite are scattered. They have
been described from Bohemia.
By far the greater number of the rocks which contain leucite
are lavas of Tertiary or recent geological age. They are never
acid rocks which contain quartz, but felspar is usually present,
though there are certain groups of leucite lavas which are non-
felspathic. Many of them also contain nepheline, sodalite,
hauyne and nosean; the much rarer mineral melilite appears
also in some examples. The commonest ferromagnesian mineral
is augite (sometimes rich in soda), with olivine in the more basic
varieties. Hornblende and biotite occur also, but are less
common. Melanite is found in some of the lavas, as in the
leucite-syenites.

The rocks in which orthoclase (or sanidine) is present in


considerable amount are leucite-trachytes, leucite-phonolites
and leucitophyres. Of these groups the two former, which are
not sharply distinguished from one another by most authors, are
common in the neighbourhood of Rome (L. Bracciano, L.
Bolsena). They are of trachytic appearance, containing
phenocysts of sanidine, leucite, augite and biotite. Sodalite or
hauyne may also be present, but nepheline is typically absent.
Rocks of this class occur also in the tuffs of the Phlegraean
Fields, near Naples. The leucitophyres are rare rocks which have
been described from various parts of the volcanic district of the
Rhine (Olbrück, Laacher See, &c.) and from Monte Vulture in
Italy. They are rich in leucite, but contain also some sanidine
and often much nepheline with hauyne or nosean. Their
pyroxene is principally aegirine or aegirine augite; some of them
are rich in melanite. Microscopic sections of some of these rocks
are of great interest on account of their beauty and the variety
of felspathoid minerals which they contain. In Brazil
leucitophyres have been found which belong to the
Carboniferous period.

Those leucite rocks which contain abundant essential


plagioclase felspar are known as leucite-tephrites and leucite-
basanites. The former consist mainly of plagioclase, leucite and
augite, while the latter contain olivine in addition. The leucite is
often present in two sets of crystals, both porphyritic and as an
ingredient of the ground mass. It is always idiomorphic with
rounded outlines. The felspar ranges from bytownite to
oligoclase, being usually a variety of labradorite; orthoclase is
scarce. The augite varies a good deal in character, being green,
brown or violet, but aegirine (the dark green pleochroic soda-
iron-augite) is seldom present. Among the accessory minerals
biotite, brown hornblende, hauyne, iron oxides and apatite are
the commonest; melanite and nepheline may also occur. The
ground mass of these rocks is only occasionally rich in glass. The
leucite-tephrites and leucite-basanites of Vesuvius and Somma
are familiar examples of this class of rocks. They are black or
ashy-grey in colour, often vesicular, and may contain many large
grey phenocysts of leucite. Their black augite and yellow green
olivine are also easily detected in hand specimens. From
Volcanello, Sardinia and Roccamonfina similar rocks are
obtained; they occur also in Bohemia, in Java, Celebes,
Kilimanjaro (Africa) and near Trebizond in Asia Minor.

Leucite lavas from which felspar is absent are divided into the
leucitites and leucite basalts. The latter contain olivine, the
former do not. Pyroxene is the usual ferromagnesian mineral,
and resembles that of the tephrites and basanites. Sanidine,
melanite, hauyne and perofskite are frequent accessory minerals
in these rocks, and many of them contain melilite in some
quantity. The well-known leucitite of the Capo di Bove, near
Rome, is rich in this mineral, which forms irregular plates, yellow
in the hand specimen, enclosing many small rounded crystals of
leucite. Bracciano and Roccamonfina are other Italian localities
for leucitite, and in Java, Montana, Celebes and New South
Wales similar rocks occur. The leucite-basalts belong to more
basic types and are rich in olivine and augite. They occur in
great numbers in the Rhenish volcanic district (Eifel, Laacher
See) and in Bohemia, and accompany tephrites or leucitites in
Java, Montana, Celebes and Sardinia. The “peperino” of the
neighbourhood of Rome is a leucitite tuff. (J. S. F.)

LEUCTRA, a village of Boeotia in the territory of Thespiae,


chiefly noticeable for the battle fought in its neighbourhood in 371
b.c. between the Thebans and the Spartans and their allies. A
Peloponnesian army, about 10,000 strong, which had invaded
Boeotia from Phocis, was here confronted by a Boeotian levy of
perhaps 6000 soldiers under Epaminondas (q.v.). In spite of inferior
numbers and the doubtful loyalty of his Boeotian allies, Epaminondas
offered battle on the plain before the town. Massing his cavalry and
the 50-deep column of Theban infantry on his left wing, he sent
forward this body in advance of his centre and right wing. After a
cavalry engagement in which the Thebans drove their enemies off
the field, the decisive issue was fought out between the Theban and
Spartan foot. The latter, though fighting well, could not sustain in
their 12-deep formation the heavy impact of their opponents’
column, and were hurled back with a loss of about 2000 men, of
whom 700 were Spartan citizens, including the king Cleombrotus.
Seeing their right wing beaten, the rest of the Peloponnesians retired
and left the enemy in possession of the field. Owing to the arrival of
a Thessalian army under Jason of Pherae, whose friendship they did
not trust, the Thebans were unable to exploit their victory. But the
battle is none the less of great significance in Greek history. It marks
a revolution in military tactics, affording the first known instance of a
deliberate concentration of attack upon the vital point of the enemy’s
line. Its political effects were equally far-reaching, for the loss in
material strength and prestige which the Spartans here sustained
deprived them for ever of their supremacy in Greece.

Authorities.—Xenophon, Hellenica, vi. 4. 3-15; Diodorus xi. 53-


56; Plutarch, Pelopidas, chs. 20-23; Pausanias ix. 13. 2-10; G. B.
Grundy, The Topography of the Battle of Plataea (London,
1894), pp. 73-76; H. Delbrück, Geschichte der Kriegskunst
(Berlin, 1900), i. 130 ff.
(M. O. B. C.)

LEUK (Fr. Loèche Ville), an ancient and very picturesque little


town in the Swiss canton of the Valais. It is built above the right
bank of the Rhone, and is about 1 m. from the Leuk-Susten station
(15½ m. east of Sion and 17½ m. west of Brieg) on the Simplon
railway. In 1900 it had 1592 inhabitants, all but wholly German-
speaking and Romanists. About 10½ m. by a winding carriage road
N. of Leuk, and near the head of the Dala valley, at a height of 4629
ft. above the sea-level, and overshadowed by the cliffs of the Gemmi
Pass (7641 ft.; q.v.) leading over to the Bernese Oberland, are the
Baths of Leuk (Leukerbad, or Loèche les Bains). They have only 613
permanent inhabitants, but are much frequented in summer by
visitors (largely French and Swiss) attracted by the hot mineral
springs. These are 22 in number, and are very abundant. The
principal is that of St Laurence, the water of which has a
temperature of 124° F. The season lasts from June to September.
The village in winter is long deprived of sunshine, and is much
exposed to avalanches, by which it was destroyed in 1518, 1719 and
1756, but it is now protected by a strong embankment from a similar
catastrophe.
(W. A. B. C.)

LEUTHEN, a village of Prussian Silesia, 10 m. W. of Breslau,


memorable as the scene of Frederick the Great’s victory over the
Austrians on December 5, 1757. The high road from Breslau to
Lüben crosses the marshy Schweidnitz Water at Lissa, and
immediately enters the rolling country about Neumarkt. Leuthen
itself stands some 4000 paces south of the road, and a similar
distance south again lies Sagschütz, while Nypern, on the northern
edge of the hill country, is 5000 paces from the road. On Frederick’s
approach the Austrians took up a line of battle resting on the two
last-named villages. Their whole position was strongly garrisoned
and protected by obstacles, and their artillery was numerous though
of light calibre. A strong outpost of Saxon cavalry was in Borne to
the westward. Frederick had the previous day surprised the Austrian
bakeries at Neumarkt, and his Prussians, 33,000 to the enemy’s
82,000, moved towards Borne and Leuthen early on the 5th. The
Saxon outpost was rushed at in the morning mist, and, covered by
their advanced guard on the heights beyond, the Prussians wheeled
to their right. Prince Charles of Lorraine, the Austrian commander-in-
chief, on Leuthen Church tower, could make nothing of Frederick’s
movements, and the commander of his right wing (Lucchesi) sent
him message after message from Nypem and Gocklerwitz asking for
help, which was eventually despatched. But the real blow was to fall
on the left under Nadasdy. While the Austrian commander was thus
wasting time, the Prussians were marching against Nadasdy in two
columns, which preserved their distances with an exactitude which
has excited the wonder of modern generations of soldiers; at the
due place they wheeled into line of battle obliquely to the Austrian
front, and in one great échelon,—the cavalry of the right wing
foremost, and that of the left “refused,”—Frederick advanced on
Sagschütz. Nadasdy, surprised, put a bold face on the matter and
made a good defence, but he was speedily routed, and, as the
Prussians advanced, battalion after battalion was rolled up towards
Leuthen until the Austrians faced almost due south. The fighting in
Leuthen itself was furious; the Austrians stood, in places, 100 deep,
but the disciplined valour of the Prussians carried the village. For a
moment the victory was endangered when Lucchesi came down
upon the Prussian left wing from the north, but Driesen’s cavalry, till
then refused, charged him in flank and scattered his troopers in wild
rout. This stroke ended the battle. The retreat on Breslau became a
rout almost comparable to that of Waterloo, and Prince Charles
rallied, in Bohemia, barely 37,000 out of his 82,000. Ten thousand
Austrians were left on the field, 21,000 taken prisoners (besides
17,000 in Breslau a little later), with 51 colours and 116 cannon. The
Prussian loss in all was under 5500. It was not until 1854 that a
memorial of this astonishing victory was erected on the battlefield.

See Carlyle, Frederick, bk. xviii. cap. x.; V. Ollech, Friedrich der
Grosse von Kolin bis Leuthen (Berlin, 1858); Kutzen, Schlacht bei
Leuthen (Breslau, 1851 ); and bibliography under Seven Years’
War.

LEUTZE, EMANUEL (1816-1868), American artist, was


born at Gmünd, Württemberg, on the 24th of May 1816, and as a
child was taken by his parents to Philadelphia, where he early
displayed talent as an artist. At the age of twenty-five he had earned
enough to take him to Düsseldorf for a course of art study at the
royal academy. Almost immediately he began the painting of
historical subjects, his first work, “Columbus before the Council of
Salamanca,” being purchased by the Düsseldorf Art Union. In 1860
he was commissioned by the United States Congress to decorate a
stairway in the Capitol at Washington, for which he painted a large
composition, “Westward the Star of Empire takes its Way.” His best-
known work, popular through engraving, is “Washington crossing the
Delaware,” a large canvas containing a score of life-sized figures; it is
now owned by the Metropolitan Museum of Art, New York. He
became a member of the National Academy of Design in 1860, and
died at Washington, D.C., on the 18th of July 1868.

LEVALLOIS-PERRET, a north-western suburb of Paris, on


the right bank of the Seine, 2½ m. from the centre of the city. Pop.
(1906) 61,419. It carries on the manufacture of motor-cars and
accessories, carriages, groceries, liqueurs, perfumery, soap, &c., and
has a port on the Seine.

LEVANT (from the French use of the participle of lever, to rise,


for the east, the orient), the name applied widely to the coastlands
of the eastern Mediterranean Sea from Greece to Egypt, or, in a
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like