Spiral for John Hunter. Python - Using multiple colors in matplotlib plot. User_interfaces example code: svg_tooltip.py — Matplotlib 1.3.x documentation. Pylab_examples example code: hyperlinks.py — Matplotlib 1.3.0 documentation. Navigation This Page Show Source Quick search Enter search terms or a module, class or function name. pylab_examples example code: hyperlinks.py¶ [source code] #! Keywords: python, matplotlib, pylab, example, codex (see Search examples) © Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2013 The matplotlib development team.
Minesweeper in Matplotlib. Lately I've been playing around with interactivity in matplotlib. A couple weeks ago, I discussed briefly how to use event callbacks to implement simple 3D visualization and later used this as a base for creating a working 3D Rubik's cube entirely in matplotlib. Today I have a different goal: re-create minesweeper, that ubiquitous single-player puzzle game that most of us will admit to having binged on at least once or twice in their lives. In minesweeper, the goal is to discover and avoid hidden mines within a gridded minefield, and the process takes some logic and quick thinking. To implement this in matplotlib, at its most stripped-down level, simply requires us to register mouse clicks on the plot window, and to have the window respond in the appropriate way. The rest is just the logic underneath. Event Callbacks Matplotlib contains several built-in event callbacks.
As a simple example, here we'll create a polygon and a function which is called each time the axis is clicked. Enjoy! Matplotlib: python plotting — Matplotlib 1.2.1 documentation. Thumbnail gallery. Color example code: colormaps_reference.py — Matplotlib 1.3.0 documentation. (Source code) """Reference for colormaps included with Matplotlib.
This reference example shows all colormaps included with Matplotlib. Note thatany colormap listed here can be reversed by appending "_r" (e.g., "pink_r").These colormaps are divided into the following categories: Sequential: These colormaps are approximately monochromatic colormaps varying smoothly between two color tones---usually from low saturation (e.g. white) to high saturation (e.g. a bright blue). Sequential colormaps are ideal for representing most scientific data since they show a clear progression from low-to-high values.
Diverging: These colormaps have a median value (usually light in color) and vary smoothly to two different color tones at high and low values. Keywords: python, matplotlib, pylab, example, codex (see Search examples) Matplotlib - Python city shapefiles. Python - shapefile and matplotlib: plot polygon collection of shapefile coordinates.
Python - Possible to make labels appear when hovering over a point in matplotlib. User_interfaces example code: svg_histogram.py — Matplotlib 1.3.x documentation.