def gnuplot(f, *between): ''' Plot the function f within the optional limits *between ''' # Create an instance of the gnuplot class graph = Gnuplot() # Get the full file name and root_file_name (excluding extension) file_name, root_file_name = graph.file_name, graph.root_file_name # Plot the function graph.plot_function(f, *between) # Return a string / html representation of the graph return StrWithHtml('Image saved to ' + file_name, '''<img src="{}.svg" style="width: 100%" />'''.format(root_file_name))