[Matplotlib-users] two axes

2014-12-02 Thread Tommy Carstensen
In gnuplot it is quite easy to create two axes, but I can't figure out how to do it in matplotlib. I'm trying this: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt for key1 in keys1: ax1.plot(x, y, style, label=label, color=color, linewidth=3)

[Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Fabien
Folks, I'm trying to use BrokenBarHCollection with pandas timeseries object. Here's a minimal example: (python 3.3, pandas 0.15.1, matplotlib 1.4.2) #- import pandas as pd import numpy as np from datetime import datetime as dt import

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Benjamin Root
Please provide the full traceback. Could you also show df.info()? In any case, I suspect that the problem is that pandas recently started using datetime64 for their timeseries, and matplotlib hasn't implemented the unit converter for it. There was a post recently showing how to add pandas's

Re: [Matplotlib-users] two axes

2014-12-02 Thread Paul Hobson
You didn't label any of the series that you put on the graph, so the legend has no idea what to call anything thing. Like the warning (not error) says, use the label parameter on your calls to plot, e.g., ax1.plot(..., label='Concentration') or whatever. Note though, that you're mixing up

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Fabien
On 02.12.2014 16:34, Benjamin Root wrote: Please provide the full traceback sure, I pasted the traceback below. Here are the pandas infos: In [17]: df.info() class 'pandas.core.frame.DataFrame' DatetimeIndex: 5 entries, 1950-01-01 00:00:00 to 1950-05-01 00:00:00 Freq: MS Data columns (total 2

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Benjamin Root
Does the workaround posted here fix things for you? https://github.com/matplotlib/matplotlib/issues/3727#issuecomment-60899590 On Tue, Dec 2, 2014 at 10:43 AM, Fabien fabien.mauss...@gmail.com wrote: On 02.12.2014 16:34, Benjamin Root wrote: Please provide the full traceback sure, I pasted

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Fabien
OK I just filled a bug report: https://github.com/matplotlib/matplotlib/issues/3872 my first bug report ever! On 02.12.2014 17:15, Fabien wrote: On 02.12.2014 16:59, Benjamin Root wrote: Does the workaround posted here fix things for you?

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Fabien
On 02.12.2014 16:59, Benjamin Root wrote: Does the workaround posted here fix things for you? https://github.com/matplotlib/matplotlib/issues/3727#issuecomment-60899590 sorry it doesn't. I updated the test case below (including the workaround, I hope I got it right). The strange thing is that

Re: [Matplotlib-users] BrokenBarHCollection with pandas timeseries

2014-12-02 Thread Benjamin Root
Ok, then this looks like a legitimate bug in span_where(). It probably isn't applying units, somehow. This isn't really a problem with pandas, it is an issue where we aren't being consistent in applying units for all plotting functions. Could you file a bug report, please? Cheers! Ben Root On