Coverage for /usr/local/lib/python3.11/dist-packages/grond/problems/vlvd/plot.py: 44%

16 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-10-26 16:25 +0000

1from ..plot import MTLocationPlot 

2from pyrocko.plot import mpl_init 

3 

4 

5class VLVDLocationPlot(MTLocationPlot): 

6 name = 'location_vlvd' 

7 beachball_type = 'full' 

8 

9 def make(self, environ): 

10 environ.setup_modelling() 

11 cm = environ.get_plot_collection_manager() 

12 history = environ.get_history(subset='harvest') 

13 mpl_init(fontsize=self.font_size) 

14 self._to_be_closed = [] 

15 cm.create_group_mpl( 

16 self, 

17 self.draw_figures(history), 

18 title=u'Volume Location', 

19 section='solution', 

20 feather_icon='target', 

21 description=u''' 

22Location plot of the ensemble of best solutions in three cross-sections. 

23 

24The coordinate range is defined by the search space given in the config file. 

25Symbols show best volume locations, and colors indicate low (red) and 

26high (blue) misfit. 

27''') 

28 for obj in self._to_be_closed: 

29 obj.close() 

30 

31 def draw_figures(self, history): 

32 return MTLocationPlot.draw_figures( 

33 self, history, color_p_axis=True)