Wookai / paper-tips-and-tricks

Best practice and tips & tricks to write scientific papers in LaTeX, with figures generated in Python or Matlab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One script per figure

petebachant opened this issue · comments

Just adding a comment here that I prefer to use one script (usually plot.py at top level) that has a positional command line argument (using argparse) for which figure(s) to create. This seems cleaner to me because you can keep your plotting functions all in one file, and generate multiple figures with a single command.

I usually end up with a hybrid approach, where figures that are related (e.g. plots of a CDF or results plots) are generated by the same script but I have different scripts for each type of figure. They all use plot_utils to set the global parameters such as font size, line width, etc., though.

I think the main point is to have script(s) that allow you to generate your figures in one click. Whether your have one big script with parameters or different scripts is more a matter of taste in my opinion :).