Skip to content

Instantly share code, notes, and snippets.

@Day0Dreamer
Created March 2, 2018 06:54
Show Gist options
  • Save Day0Dreamer/c5b32b8fb91ef07ac1698bc42e906f37 to your computer and use it in GitHub Desktop.
Save Day0Dreamer/c5b32b8fb91ef07ac1698bc42e906f37 to your computer and use it in GitHub Desktop.
def decorator(func):
def wrapper():
plot = figure()
func(plot)
output_file = output_file_name
show(plot)
return wrapper
@decorator
def python_list(plot):
x = [1, 2, 3, 4, 5]
y = [3, 6, 4, 6, 8]
plot.line(x, y, line_width=3)
plot.circle(x, y, fill_color='white', size=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment