Pretty Grapher

Our lab often has to generate graphs for scientific publications. It can be very time consuming to get them looking just right. This project involves an automated graph-generating python script. It will accept a JSON file as input. That file includes the following: the data to plot, the type of graph, whether color or black and white should be used, the graph title, and the axes labels.

After loading the JSON data, the script will create the appropriate graph using the seaborn library. For the font, we prefer Ariel bold. The graph will then be saved in a vector format (preferably SVG).

Here are the kinds of graphs we’re interested in:

  1. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.jointplot.html#seaborn.jointplot
    • Search: “Add regression and kernel density fits”
    • Search: “Replace the scatterplots and histograms with density estimates and align the marginal Axes tightly with the joint Axes”
  2. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.distplot.html#seaborn.distplot
    • Search: “Show a default plot with a kernel density estimate and histogram with bin size determined automatically with a reference rule.”
  3. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.kdeplot.html#seaborn.kdeplot
    • Search: “Use filled contours”
  4. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.regplot.html#seaborn.regplot
    • Search: “Plot the relationship between two variables in a DataFrame”
  5. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.boxplot.html#seaborn.boxplot
    • Search: “Use swarmplot() to show the datapoints on top of the boxes”
  6. https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.barplot.html#seaborn.barplot
    • Search: “Add β€œcaps” to the error bars”