Skip to content

Commit 77dab11

Browse files
committedJan 15, 2015
gui/XYWindow: better bounds
1 parent 5df8ffe commit 77dab11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

Diff for: ‎artiq/gui/rt_results.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ def delete(self):
2828
class XYWindow(_PlotWindow):
2929
def on_draw(self, widget, ctx):
3030
if self.data is not None:
31+
data = self.filter_data()
3132
cairoplot.scatter_plot(
3233
ctx,
33-
data=self.filter_data(),
34+
data=data,
3435
width=widget.get_allocated_width(),
3536
height=widget.get_allocated_height(),
37+
x_bounds=(min(data[0])*0.98, max(data[0])*1.02),
38+
y_bounds=(min(data[1])*0.98, max(data[1])*1.02),
3639
border=20, axis=True, grid=True,
3740
dots=1, discrete=True,
3841
series_colors=[(0.0, 0.0, 0.0)],

0 commit comments

Comments
 (0)
Please sign in to comment.