コード例 #1
0
    def setup_method(self, method):

        self.data = Data(label='d1')
        self.data.coords = SimpleCoordinates()
        with NumpyRNGContext(12345):
            self.data['x'] = random_with_nan(48, 5).reshape((6, 4, 2))
            self.data['y'] = random_with_nan(48, 12).reshape((6, 4, 2))
        self.data_collection = DataCollection([self.data])
        self.app = GlueApplication(self.data_collection)
        self.viewer = self.app.new_data_viewer(ProfileViewer)
        self.viewer.add_data(self.data)
コード例 #2
0
    def setup_method(self, method):

        with NumpyRNGContext(12345):
            self.data = Data(**dict((name, random_with_nan(100, nan_index=idx + 1)) for idx, name in enumerate('abcdefgh')))
        self.data_collection = DataCollection([self.data])
        ga = GlueApplication(self.data_collection)
        self.viewer = ga.new_data_viewer(HistogramViewer)
        self.viewer.add_data(self.data)
        self.viewer.state.x_att = self.data.id['a']
コード例 #3
0
ファイル: test_python_export.py プロジェクト: glue-viz/glue
    def setup_method(self, method):

        with NumpyRNGContext(12345):
            self.data = Data(**dict((name, random_with_nan(100, nan_index=idx + 1)) for idx, name in enumerate('abcdefgh')))
        self.data_collection = DataCollection([self.data])
        self.app = GlueApplication(self.data_collection)
        self.viewer = self.app.new_data_viewer(HistogramViewer)
        self.viewer.add_data(self.data)
        self.viewer.state.x_att = self.data.id['a']
コード例 #4
0
    def setup_method(self, method):

        with NumpyRNGContext(12345):
            self.data = Data(**dict(
                (name, random_with_nan(100, nan_index=idx + 1))
                for idx, name in enumerate('abcdefgh')))
        self.data['angle'] = np.random.uniform(0, 360, 100)
        self.data_collection = DataCollection([self.data])
        self.app = GlueApplication(self.data_collection)
        self.viewer = self.app.new_data_viewer(ScatterViewer)
        self.viewer.add_data(self.data)
        self.viewer.state.x_att = self.data.id['a']
        self.viewer.state.y_att = self.data.id['b']