This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
# Copyright 2019 Planet Labs, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# Copyright 2023 Planet Labs, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
def arrowed_spines(ax=None, arrow_length=20, labels=('', ''), arrowprops=None): | |
xlabel, ylabel = labels | |
if ax is None: | |
ax = plt.gca() | |
if arrowprops is None: | |
arrowprops = dict(arrowstyle='<|-', facecolor='black') | |
for i, spine in enumerate(['left', 'bottom']): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
def main(): | |
t = np.linspace(0, 4*np.pi, 1000) | |
fig, ax = plt.subplots() | |
ax.plot(t, np.cos(t)) | |
ax.plot(t, np.sin(t)) | |
inception(inception(inception(fig))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import h5py | |
def main(): | |
data = read() | |
if sys.argv[1] == 'x': | |
x_slice(data) | |
elif sys.argv[1] == 'z': | |
z_slice(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
931 | Oxfordshire | 9314125 | 123255 | Larkmead School | Abingdon | 125 | 124 | 20 | SUPP | 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|
931 | Oxfordshire | 9314126 | 123256 | John Mason School | Abingdon | 164 | 164 | 25 | 6 | 16 | |
931 | Oxfordshire | 9314127 | 123257 | Fitzharrys School | Abingdon | 150 | 149 | 9 | 0 | 11 | |
931 | Oxfordshire | 9316076 | 123298 | Our Lady's Abingdon | Abingdon | 57 | 57 | SUPP | SUPP | 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
from matplotlib.axes import Axes | |
from matplotlib.patches import Circle | |
from matplotlib.path import Path | |
from matplotlib.ticker import NullLocator, Formatter, FixedLocator | |
from matplotlib.transforms import Affine2D, BboxTransformTo, Transform | |
from matplotlib.projections import register_projection | |
import matplotlib.spines as mspines | |
import matplotlib.axis as maxis | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# There are two ways to clip data to irregular boundaries. | |
# One uses a masked array (and is most useful for "real" data) | |
# The other uses set_clip_path (and is most useful for graphics) | |
# This demonstrates the first (masked array) | |
import matplotlib.pyplot as plt | |
import scipy.ndimage | |
import numpy as np | |
import skimage.draw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
class DrawDragPoints(object): | |
""" | |
Demonstrates a basic example of the "scaffolding" you need to efficiently | |
blit drawable/draggable/deleteable artists on top of a background. | |
""" | |
def __init__(self): | |
self.fig, self.ax = self.setup_axes() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Silly auto-generated art. Meant to look like some sort of mold spores. | |
Deliberately slow to render -- meant to look good at high-res. | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.colors as mcolors | |
from matplotlib.collections import LineCollection | |
NewerOlder