Skip to content

Instantly share code, notes, and snippets.

View pelson's full-sized avatar

Phil Elson pelson

View GitHub Profile
@pelson
pelson / Unstructured grid visualisation.ipynb
Created April 23, 2013 15:39
An extension of http://nbviewer.ipython.org/3959751 to show vectors in a triangulated grid.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / using.ipynb
Last active December 17, 2015 14:59
Demonstration of the new from_levels_and_colors function.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / working_with_colors.ipynb
Last active December 17, 2015 16:09
Demonstration of using colormaps with custom colors. Follows on from the discussion at https://groups.google.com/forum/?fromgroups#!topic/scitools-iris/hsb6ExNgSss
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / Image interpolation from cartopy.ipynb
Last active December 17, 2015 19:39
Work in progress documentation on the spherical image interpolation scheme available in Cartopy.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / Matplotlib v1.3.0 features.ipyn
Last active December 17, 2015 21:40
A summary of my matplotlib v1.3.0 feature enhancements
{
"metadata": {
"name": "Matplotlib v1.3.0 features"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@pelson
pelson / EIDA50_201211061300_clip2.png
Last active December 19, 2015 00:49
Scipy Presentation 2013: Iris & Cartopy
EIDA50_201211061300_clip2.png
@pelson
pelson / massive_arrays_with_biggus.ipynb
Last active December 20, 2015 13:29
Uses biggus to expose "virtual" arrays much larger than one would expect to be able to load into memory. (Still work in progress)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / Handling ORCA data in Iris.ipynb
Created August 13, 2013 08:40
A very rough example of working with ORCA data in iris and cartopy.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / area_map.py
Last active December 21, 2015 12:58
Answers a question over at stackoverflow relating to html area maps from cartopy (http://stackoverflow.com/questions/18380365/cartopy-country-map-with-html-area-links)
import cartopy.crs as ccrs
import cartopy.io.shapereader as shpreader
import matplotlib.pyplot as plt
import numpy as np
import shapely.geometry as sgeom
# Set up the figure, and an axes which fits the figure as much as possible.
fig = plt.figure(figsize=(14, 10))
ax = plt.axes([0, 0, 1, 1], projection=ccrs.PlateCarree())
@pelson
pelson / clipping_contours_with_mpl.ipynb
Last active December 22, 2015 03:28
Demonstrates path clipping on a contour set using a shapely geometry in response to a question by Alex Goodman on the matplotlib mailing list (subject "Clipping a plot inside a polygon").
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.