예제 #1
0
    def test_with_thickness_plot(self):
        '''
		Test the capability of plotting by passing only the data file
		'''
        from matplotlib import pyplot as plt

        output_file = os.path.join(self.out_dir, 'slice_plot2.png')
        _, ax = plt.subplots(1, 1)

        try:
            gs.slice_plot(self.data,
                          orient='xy',
                          cmap='viridis',
                          output_file=output_file,
                          slice_thickness=20)
            gs.slice_plot(self.data,
                          orient='xy',
                          cmap='viridis',
                          output_file=output_file,
                          slice_thickness=20,
                          ax=ax)
        except Exception as ex:
            self.fail(
                'Unable to test the slice plot with simple settings \n{}'.
                format(str(ex)))

        self.assertEqual(os.path.isfile(output_file), True)
예제 #2
0
    def test_simple_plot(self):
        '''
		Test the capability of plotting by passing only the data file
		'''

        output_file = os.path.join(self.out_dir, 'slice_plot1.png')
        try:
            gs.slice_plot(self.data,
                          griddef=self.data.griddef,
                          orient='xy',
                          cmap='viridis',
                          output_file=output_file)
        except Exception as ex:
            self.fail(
                'Unable to test the slice plot with simple settings \n{}'.
                format(str(ex)))

        self.assertEqual(os.path.isfile(output_file), True)
예제 #3
0
import pygeostat as gs
grid_str = '''120 5.00  10.00 -nx, xmn, xsiz
            110 1205.00  10.00 -ny, ymn, ysiz
            1 0.5 1.0  -nz, zmn, zsiz'''

griddef = gs.GridDef(grid_str=grid_str)

data_fl = gs.ExampleData("grid2d_surf", griddef=griddef)
ax = gs.slice_plot(data_fl, var="Thickness")
_ = gs.contour_plot(data_fl, var="Thickness", ax=ax, clabel=True)
예제 #4
0
import pygeostat as gs
griddef = gs.GridDef([40, 0.5, 1, 40, 0.5, 1, 40, 0.5, 1])
data_file = gs.ExampleData('3d_grid', griddef)
gs.slice_plot(data_file, orient='xy', cmap='viridis', slice_thickness=20)
예제 #5
0
import pygeostat as gs
griddef = gs.GridDef([40,0.5,1,40,0.5,1,40,0.5,1])
data_file = gs.ExampleData('3d_grid', griddef)
gs.slice_plot(data_file, orient='xy', cmap='viridis')