Yes, it's perfect. For the record, here's the code with a few bells and whistles added.
@interact def int_plot(t1=text_control("Enter data as a list of pairs, and set window [a,b] by [c,d]."), str1 = input_box('[[1975,4123], [1980,3851], [1985,3461], [1990,2827], [1995,2515], [2000, 2092]]',type = str, label='data '), a = (1970), b = (2000), c = (2000), d = (4500) , xlabel= ('Year'), ylabel= ('Consumption')):
array1=eval(str1)
s=scatter_plot(array1, xmin=a, xmax = b, ymin=c, ymax=d, figsize=6, axes_labels=[str(xlabel),str(ylabel)])
show(s)
↧