From 77dab117460a61dd27553f9b6103d767ba67121f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 15 Jan 2015 11:22:44 +0800 Subject: [PATCH] gui/XYWindow: better bounds --- artiq/gui/rt_results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/gui/rt_results.py b/artiq/gui/rt_results.py index 9761ceb45..d35802da2 100644 --- a/artiq/gui/rt_results.py +++ b/artiq/gui/rt_results.py @@ -28,11 +28,14 @@ class _PlotWindow(Window): class XYWindow(_PlotWindow): def on_draw(self, widget, ctx): if self.data is not None: + data = self.filter_data() cairoplot.scatter_plot( ctx, - data=self.filter_data(), + data=data, width=widget.get_allocated_width(), height=widget.get_allocated_height(), + x_bounds=(min(data[0])*0.98, max(data[0])*1.02), + y_bounds=(min(data[1])*0.98, max(data[1])*1.02), border=20, axis=True, grid=True, dots=1, discrete=True, series_colors=[(0.0, 0.0, 0.0)],