Cleaner plotting tools

I've created a file plot.py along with some tools in plot_tools/tools.py

It builds on top of plotbars.py, but with a few additions:

  1. I've added the argument kind, which can be set with -k from command line. It currently supports bar and line. Line plots do support error bars.
  2. The code has been refactored
  3. I've added the argument --metadata, which the application can use to provide additional data about the series: For example, the following ignores series X from the input, and forces a specific ordering of [B, A]. It also chooses patterns (for bar plots) and markers (for line plots), as well as colors (for both kinds of plots) for each series. Additionally, each series can be renamed to a pretty name that will show up in the legend. I've found these features useful when producing plots for a paper. It will lock in every series to a specific color/marker/pattern which won't change if the data or ordering are changed (unlike when metadata is not provided, which is perfectly comfortable for 'playing around')
{
    "ignore": ["X"],
    "ordering": ["B", "A"], 
    "translate": {
        "A": "Plot A", 
        "B": "Plot B"
    }, 
    "patterns": {
        "A": "o", 
        "B": "x"
    }, 
    "markers": {
        "A": "v", 
        "B": "o"
    }, 
    "colors": {
        "A": 0, 
        "B": 3
    }
}
Edited by Mohammad Khalaji

Merge request reports

Loading