Remove global variables from ba_plot
-
The implicit parsing of commandline arguments is eliminated from the
ba_plot
module; therefore, importingba_plot
will have no side-effects. Originally, the implicit parsing of commandline arguments during importing led to crashes when the module was imported in a different environment, like a Jupyter notebook. -
All global variables are removed from the
ba_plot.py
module and plot arguments are made explicit to avoid unexpected problems due to corruption of global variables. In the originall scheme, storing the plot arguments as global variable would lead to strange behaviour if two examples were run sequentially, since the global plot arguments would persist in the global scope from one example to the other.
Related to #912
Edited by Ammar Nejati