> just make a numpy array out of your two lists, and you'll be able
> to subtract one from the other.
>
> import numpy as np
> top = np.array(top)
> bot = np.array(bot)
Thank you, Paul. That worked and I'm now able to display bar charts.
I appreciate it.
Best,
Che
--
C M, on 2011-01-27 13:56, wrote:
> bars = self.subplot.bar(self.final_dates, top-bot, bottom=bot, align='center')
>
> I get the error:
>
> TypeError: unsupported operand type(s) for -: 'list' and 'list'
>
> Because I am trying to subtract the "bots" list from the "tops" list.
> In the example c
Hi Paul,
> The reason you were getting that error is because unless you
> specify otherwise, ax.bar will make the bottom of the bars at 0 -
> which isn't an allowed date, hence the error. Change your bar
> line to this (I also added align='center', but you can remove it
> if you want):
Aha, OK th
C M, on 2011-01-27 02:03, wrote:
> > 3) I am getting just hammered with the following error *a lot* in date
> > plotting lately:
> >
> > ValueError: ordinal must be >= 1
>
>
> OK, I made up a small runnable sample to show this with bar(). (Using
> code that someone else wrote[1]). This code ru
> 3) I am getting just hammered with the following error *a lot* in date
> plotting lately:
>
> ValueError: ordinal must be >= 1
OK, I made up a small runnable sample to show this with bar(). (Using
code that someone else wrote[1]). This code runs when using
plot_date(), but if you comment that
On Wed, Jan 26, 2011 at 9:16 PM, Jae-Joon Lee wrote:
> On Thu, Jan 27, 2011 at 10:07 AM, C M wrote:
>> I know the 2nd problem is that a dictionary cannot have a mutable
>> object like a list as a key. But previously, as I said, I was able to
>> call line, (with the comma) and it would work. In
On Thu, Jan 27, 2011 at 10:07 AM, C M wrote:
> I know the 2nd problem is that a dictionary cannot have a mutable
> object like a list as a key. But previously, as I said, I was able to
> call line, (with the comma) and it would work. In fact, line, with a
> comma gives this type:
>
If you just
> Just a thought, are you trying out the new legend code?
I don't know if I am or not. But these problems are prior to any code
regarding the legend.
> Could you do a print of the type for bars?
When I write it as just bars without the comma it is:
bars type =
If I write it with the comma (
On Wednesday, January 26, 2011, C M wrote:
> I usually do this for line graphs with markers:
>
> line, = self.subplot.plot_date(dates,data)
>
> along with some keywords to tweak the plot. I then add line to a
> dictionary to keep track of it:
>
> self.line_to_data_dict[line] = self.activi
I usually do this for line graphs with markers:
line, = self.subplot.plot_date(dates,data)
along with some keywords to tweak the plot. I then add line to a
dictionary to keep track of it:
self.line_to_data_dict[line] = self.activity
But today I tried this with a bar chart, just changin
10 matches
Mail list logo