Skip to content

Commit

Permalink
Merge pull request #37 from GlobalFishingWatch/update-examples
Browse files Browse the repository at this point in the history
Updated example code and pushed to rendered repo
  • Loading branch information
jennvanosdel authored Mar 3, 2022
2 parents a6370da + 7b0c435 commit 56f4fa2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pyseas/doc/Examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
# ## Bivariate Rasters
#
# There is basic support for Bivariate plots, although only TransparencyBivariateColormap
# has been significantly tested at this time.
# has been significantly tested at this time. Works for both dark and light themes.

# +
df = pd.read_csv("data/fishing_effort_known_vs_unknown_2020_1deg.csv.zip")
Expand Down Expand Up @@ -580,7 +580,7 @@
)

cmap = psm.cm.bivariate.TransparencyBivariateColormap(psm.cm.bivariate.orange_blue)
with psm.context(psm.styles.dark):
with psm.context(psm.styles.light):
fig = plt.figure(figsize=(15, 15))
ax = psm.create_map()
psm.add_land(ax)
Expand Down Expand Up @@ -804,3 +804,12 @@

# +
# plt.savefig('/path/to/file.png', dpi=300, facecolor=plt.rcParams['pyseas.fig.background'])
# -

# ## Push rendered notebook to `rendered` repo
# Only uncomment this and run it if you know what you're doing.

# +
# import rendered
# rendered.publish_to_github(f'./Examples.ipynb',
# 'pyseas/doc/', action='push')

0 comments on commit 56f4fa2

Please sign in to comment.