@@ -110,27 +110,35 @@ For this purpose, EOmaps provides 2 convenience-functions:
110110 - Note that this means that the classification specs as well as ``vmin ``, ``vmax `` and the used ``colormap `` will be the same!
111111
112112
113- .. code-block :: python
114- :name: test_zoomed_in_data_maps
115-
116- from eomaps import Maps
117- import numpy as np
118-
119- x, y = np.meshgrid(np.linspace(- 20 , 20 , 50 ), np.linspace(- 50 , 60 , 100 ))
120- data = x + y
121-
122- m = Maps(ax = 131 )
123- m.set_data(data, x, y)
124- m.set_shape.raster()
125- m.set_classify.Quantiles(k = 10 )
126- m.plot_map(cmap = " tab10" , vmin = - 10 , vmax = 40 )
127-
128- # Create a new inset-map that shows a zoomed-in view on a given dataset
129- m_inset = m.new_inset_map(xy = (5 , 20 ), radius = 8 , plot_position = (0.75 , .5 ))
130-
131- # inherit both the data and the classification specs from "m"
132- m_inset.inherit_data(m)
133- m_inset.inherit_classification(m)
113+ .. table ::
114+ :widths: 60 40
115+ :align: center
134116
135- m_inset.set_shape.rectangles()
136- m_inset.plot_map(ec = " k" , lw = 0.25 )
117+ +-------------------------------------------------------------------------------+--+
118+ | .. code-block:: python | |
119+ | :name: test_inset_maps_3 | |
120+ | | |
121+ | from eomaps import Maps | |
122+ | import numpy as np | |
123+ | | |
124+ | x, y = np.meshgrid(np.linspace(-20, 20, 50), np.linspace(-50, 60, 100)) | |
125+ | data = x + y | |
126+ | | |
127+ | m = Maps(ax=131) | |
128+ | m.set_data(data, x, y) | |
129+ | m.set_shape.raster() | |
130+ | m.set_classify.Quantiles(k=10) | |
131+ | m.plot_map(cmap="tab10", vmin=-10, vmax=40) | |
132+ | | |
133+ | # Create a new inset-map that shows a zoomed-in view on a given dataset | |
134+ | m_inset = m.new_inset_map(xy=(5, 20), radius=8, plot_position=(0.75, .5)) | |
135+ | | |
136+ | # inherit both the data and the classification specs from "m" | |
137+ | m_inset.inherit_data(m) | |
138+ | m_inset.inherit_classification(m) | |
139+ | | |
140+ | m_inset.set_shape.rectangles() | |
141+ | m_inset.plot_map(ec="k", lw=0.25) | |
142+ | | |
143+ | | |
144+ +-------------------------------------------------------------------------------+--+
0 commit comments