Пример #1
0
    def test_categorical_plot(self):
        '''
		Test the capability of plotting a categorical variable
		'''

        output_file = os.path.join(self.out_dir, 'drill_plot2.png')

        try:
            _ = gs.drill_plot(self.data['Elevation'],
                              self.data['Lithofacies'],
                              output_file=output_file)

        except Exception as ex:
            self.fail(
                'Unable to test the drill_plot for a categorical variable\n{}'.
                format(str(ex)))

        self.assertEqual(os.path.isfile(output_file), True)
Пример #2
0
    def test_continuous_plot(self):
        '''
		Test the capability of plotting a continuous variable
		'''

        output_file = os.path.join(self.out_dir, 'drill_plot1.png')

        try:
            _ = gs.drill_plot(self.data['Elevation'],
                              self.data['Sw'],
                              grid=True,
                              output_file=output_file)

        except Exception as ex:
            self.fail(
                'Unable to test the drill_plot for a continuous variable\n{}'.
                format(str(ex)))

        self.assertEqual(os.path.isfile(output_file), True)
Пример #3
0
    def test_categorical_custom_plot(self):
        '''
		Test the capability of plotting a categorical variable with custom categorical dictionary
		'''

        output_file = os.path.join(self.out_dir, 'drill_plot3.png')

        try:
            cat_dict = {
                1: {
                    'name': 'Sand',
                    'color': 'gold'
                },
                3: {
                    'name': 'SHIS',
                    'color': 'orange'
                },
                4: {
                    'name': 'MHIS',
                    'color': 'green'
                },
                5: {
                    'name': 'MUD',
                    'color': 'gray'
                }
            }

            _ = gs.drill_plot(self.data['Elevation'],
                              self.data['Lithofacies'],
                              categorical_dictionary=cat_dict,
                              output_file=output_file)

        except Exception as ex:
            self.fail(
                'Unable to test the drill_plot for a categorical variable with custom categorical dictionary\n{}'
                .format(str(ex)))

        self.assertEqual(os.path.isfile(output_file), True)
Пример #4
0
import pygeostat as gs
dat = gs.ExampleData('point3d_ind_mv')
data = dat.data[dat.data['HoleID'] == 3]
gs.drill_plot(data['Elevation'], data['Lithofacies'])
Пример #5
0
import pygeostat as gs
dat = gs.ExampleData('point3d_ind_mv')
data = dat.data[dat.data['HoleID'] == 3]
gs.drill_plot(data['Elevation'], data['Sw'], grid=True)
Пример #6
0
import pygeostat as gs
dat = gs.ExampleData('point3d_ind_mv')
data = dat.data[dat.data['HoleID'] == 3]
cat_dict = {
    1: {
        'name': 'Sand',
        'color': 'gold'
    },
    3: {
        'name': 'SHIS',
        'color': 'orange'
    },
    4: {
        'name': 'MHIS',
        'color': 'green'
    },
    5: {
        'name': 'MUD',
        'color': 'gray'
    }
}
gs.drill_plot(data['Elevation'],
              data['Lithofacies'],
              categorical_dictionary=cat_dict)