A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://matplotview.readthedocs.io/en/latest/examples/plot_07_geographic_viewing.html below:

Viewing Geographic Projections — matplotview 1.0.0 documentation

Viewing Geographic Projections

Matplotview also works with matplotlib’s built in geographic projections.

 7 import matplotlib.pyplot as plt
 8 import numpy as np
 9 from matplotview import view
10
11 x = np.linspace(-2.5, 2.5, 20)
12 y = np.linspace(-1, 1, 20)
13 circ_gen = lambda: plt.Circle((1.5, 0.25), 0.7, ec="black", fc="blue")
14
15 fig_test = plt.figure()
16
17 # Plot in 2 seperate geographic projections...
18 ax_t1 = fig_test.add_subplot(1, 2, 1, projection="hammer")
19 ax_t2 = fig_test.add_subplot(1, 2, 2, projection="lambert")
20
21 ax_t1.grid(True)
22 ax_t2.grid(True)
23
24 ax_t1.plot(x, y)
25 ax_t1.add_patch(circ_gen())
26
27 view(ax_t2, ax_t1)
28
29 fig_test.tight_layout()
30 fig_test.savefig("test7.png")

Total running time of the script: (0 minutes 0.897 seconds)

Gallery generated by Sphinx-Gallery


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4