Skip to content

Commit 66aa458

Browse files
authored
Merge pull request #401 from ocefpaf/update_examples
Update examples
2 parents 3de6746 + fdec6e1 commit 66aa458

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+128
-22
lines changed

examples/allskymap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
from __future__ import unicode_literals
24
"""
35
AllSkyMap is a subclass of Basemap, specialized for handling common plotting

examples/allskymap_cr_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
"""
24
Example of astronomical use of AllSkyMap class in allskymap.py module
35

examples/animate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
# example using matplotlib.animation to create a movie
24
# reads data over http - needs an active internet connection.
35

examples/barb_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
from mpl_toolkits.basemap import Basemap
24
import numpy as np
35
import matplotlib.pyplot as plt

examples/ccsm_popgrid.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
"""
24
This example shows how to plot data on rectangular 2D grids
35
(grids that are not rectlinear in geographic or native map projection
@@ -56,7 +58,7 @@
5658
m.fillcontinents(color='white')
5759

5860
x, y = m(tlon,tlat)
59-
im = m.pcolor(x,y,ma.masked_array(np.zeros(temp.shape,'f'), temp.mask),
61+
im = m.pcolormesh(x,y,ma.masked_array(np.zeros(temp.shape,'f'), temp.mask),
6062
shading='faceted', antialiased=True, cmap=plt.cm.cool,
6163
vmin=0, vmax=0)
6264
# disclaimer: these are not really the grid cells because of the

examples/contour_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
from mpl_toolkits.basemap import Basemap
24
import numpy as np
35
import matplotlib.pyplot as plt

examples/counties.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
import matplotlib.pyplot as plt
24
from mpl_toolkits.basemap import Basemap
35

46
def draw_map_background(m, ax):
5-
ax.set_axis_bgcolor('#729FCF')
7+
ax.set_facecolor('#729FCF')
68
m.fillcontinents(color='#FAFAFA', ax=ax, zorder=0)
79
m.drawcounties(ax=ax)
810
m.drawstates(ax=ax)

examples/cubed_sphere.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
from mpl_toolkits.basemap import Basemap
24
import matplotlib.pyplot as plt
35
import numpy as np

examples/customticks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
from __future__ import unicode_literals
24
from mpl_toolkits.basemap import Basemap
35
import numpy as np

examples/daynight.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
import numpy as np
24
from mpl_toolkits.basemap import Basemap
35
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)