Posts Tagged ‘plot’

Create a second y-axis in matplotlib

Sunday, December 2nd, 2007

Today I was trying to figure out how to plot two time series with differently scaled values. I found two_scales.py example in the matplotlib examples which describes how to do it.

Here’s a slightly simplified version of the code, and afterward a detailed explanation of what’s going on. (more…)

Creating a custom bar plot in matplotlib

Saturday, November 3rd, 2007

Bar plots are one of the simplest kinds of plots, but for some reason in many programs it’s difficult to get the labels you want, correct error bars, and control over every aspect of the plot. Here’s how to create a custom bar plot using the Python plotting module matplotlib. (more…)