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_00_simplest_example.html below:

The Simplest View — matplotview 1.0.0 documentation

The Simplest View

The simplest example: We make a view of a line! Views can be created quickly using matplotview.view() .

 9 from matplotview import view
10 import matplotlib.pyplot as plt
11
12 fig, (ax1, ax2) = plt.subplots(1, 2)
13
14 # Plot a line in the first axes.
15 ax1.plot([i for i in range(10)], "-o")
16
17 # Create a view! Turn axes 2 into a view of axes 1.
18 view(ax2, ax1)
19 # Modify the second axes data limits so we get a slightly zoomed out view
20 ax2.set_xlim(-5, 15)
21 ax2.set_ylim(-5, 15)
22
23 fig.show()

Total running time of the script: (0 minutes 0.205 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