Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
>Your example isn't minimal enough for me to be able to pin it down any >better than that, though. Chris, I was able to simply it even further. Please look at this: $ cat test.batch.csv Value,Value 10,2 5,2 10,2 $ cat test.py import pandas as pd import csv,sys import matplotlib import

Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
>I installed the latest pandas, although on Python 3.10, and the script >worked without a problem. Yes as I wrote it works with 1.3.3 but mine is 1.2.3. I am trying to keep the current version because of the possible future consequences. In the end maybe I have to upgrade the pandas. Regards,

Re: get_axes not present?

2021-11-21 Thread MRAB
On 2021-11-21 16:39, Mahmood Naderan via Python-list wrote: The best way to get assistance here on the list is to create a minimal, self-contained, run-able, example program that you can post in its entirety here that demonstrates the issue. I created a sample code with input. Since the code

Re: get_axes not present?

2021-11-21 Thread Chris Angelico
On Mon, Nov 22, 2021 at 3:40 AM Mahmood Naderan via Python-list wrote: > File > "/home/mahmood/.local/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py", > line 903, in _get_subplots > ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, > Subplot) >

Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
>The best way to get >assistance here on the list is to create a minimal, self-contained, >run-able, example program that you can post in its entirety here that >demonstrates the issue. I created a sample code with input. Since the code processes a csv file to group input rows, I also included

Re: get_axes not present?

2021-11-21 Thread Michael Torrie
On 11/19/21 10:38 AM, Mahmood Naderan wrote: >> And what is the result of plot()?  Is it a valid object, or is it None? > > Well the error happens on the plot() line. I tried to print some information > like this: > > Any thoughts on that? It's not really possible for us to know what is

Re: get_axes not present?

2021-11-19 Thread Mahmood Naderan via Python-list
>And what is the result of plot()?  Is it a valid object, or is it None? Well the error happens on the plot() line. I tried to print some information like this:     print("axes=", axes)     print("axes[0]=", axes[0])     print("cnt=", cnt)     print("row=", row)     ax1 = row.plot(

Re: get_axes not present?

2021-11-18 Thread Michael Torrie
On 11/18/21 10:54 AM, Mahmood Naderan via Python-list wrote: > As you can see I put the result of plot() to ax1 and then use some functions, > e.g. set_ylabel(). And what is the result of plot()? Is it a valid object, or is it None? -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-18 Thread Mahmood Naderan via Python-list
>It's not saying get_axes doesn't exist because of version skew, it's >saying that the object returned by the call to the left of it >(get_figure()) returned None, and None doesn't have methods > >Something isn't set up right, but you'll have to trace that through. Do you think the

Re: get_axes not present?

2021-11-18 Thread Mats Wichmann
On 11/18/21 02:49, Mahmood Naderan via Python-list wrote:   File "/home/mahmood/.local/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py", line 903, in _get_subplots     ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, Subplot) AttributeError: 'NoneType'

get_axes not present?

2021-11-18 Thread Mahmood Naderan via Python-list
Hi I am using the following versions >>> import matplotlib >>> print(matplotlib. __version__) 3.3.4 >>> import pandas as pd >>> print(pd.__version__) 1.2.3 >>> import sys >>> sys.version_info sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0) In my code, I use axes