Example #1
0
    def make_plot(self):
        try:
            x_data, y_data, z_data = [
                self.data[:, axis].astype(float) for axis in self.axes
            ]
        except ValueError as e:
            MessageDialog(self, str(e), 'Invalid value').Show()
            return

        try:
            surface_data, x_bounds, y_bounds, _ = triples_to_mesh(
                x_data, y_data, z_data)
        except Exception as e:
            MessageDialog(self, str(e), 'Conversion failure').Show()
            return

        x_label, y_label, z_label = [self.headings[x] for x in self.axes]
        title = '{0} vs ({1}, {2})'.format(z_label, x_label, y_label)

        frame = SurfacePlotFrame(self.parent,
                                 surface_data,
                                 x_bounds,
                                 y_bounds,
                                 x_label,
                                 y_label,
                                 z_label,
                                 title=title,
                                 style='surface')
        frame.Show()

        return True
Example #2
0
    def make_plot(self):
        try:
            x_data, y_data, z_data = [
                self.data[:, axis].astype(float) for axis in self.axes
            ]
        except ValueError as e:
            MessageDialog(self, str(e), 'Invalid value').Show()
            return

        try:
            if self.interp_mode == '_2d_no_mask':
                color_data, x_bounds, y_bounds, _ = triples_to_mesh(
                    x_data, y_data, z_data, self.max_mesh, has_mask=False)
            elif self.interp_mode == '_2d_full_mask':
                color_data, x_bounds, y_bounds, _ = triples_to_mesh(
                    x_data, y_data, z_data, self.max_mesh, has_mask=True)
            elif self.interp_mode == '_y':
                color_data, x_bounds, y_bounds, _ = triples_to_mesh_y(
                    x_data, y_data, z_data, self.max_mesh)
            else:
                MessageDialog(self,
                              'This feature is not yet impelemted. Sorry!',
                              'Not immplemented!').Show()
        except Exception as e:
            MessageDialog(self, str(e), 'Conversion failure').Show()
            return

        x_label, y_label, z_label = [self.headings[x] for x in self.axes]
        title = '{0} vs ({1}, {2})'.format(z_label, x_label, y_label)

        frame = ColormappedPlotFrame(self.parent,
                                     color_data,
                                     x_bounds,
                                     y_bounds,
                                     x_label,
                                     y_label,
                                     title=title)
        frame.Show()

        return True
Example #3
0
	def make_plot(self):
		try:
			x_data, y_data, z_data = [self.data[:,axis].astype(float) for axis in self.axes]
		except ValueError as e:
			MessageDialog(self, str(e), 'Invalid value').Show()
			return

		try:
			surface_data, x_bounds, y_bounds, _ = triples_to_mesh(x_data, y_data, z_data)
		except Exception as e:
			MessageDialog(self, str(e), 'Conversion failure').Show()
			return

		x_label, y_label, z_label = [self.headings[x] for x in self.axes]
		title = '{0} vs ({1}, {2})'.format(z_label, x_label, y_label)

		frame = SurfacePlotFrame(self.parent, surface_data, x_bounds, y_bounds,
				x_label, y_label, z_label, title=title, style='surface')
		frame.Show()

		return True