Oct-03-2020, 01:44 PM

Hi all

I was hoping someone could help me.

I am trying to create a series of plots from a large data set.

But every plot has a different set of X & Y values.

In the attachment I want to plot Column 5 with Column 6 for rows between 0 and 20.

The next plot would start also plot Column 5 with Column 6 but rows between 21 and 41.

The code I have is as follows:-

I loop through the dataset making start_counter = 0 and end_counter = 20 and once i plot the data i set start_counter = 21 and end_counter = 41 (thats the idea anyway).

The problem is that i keep getting the following error:-

Thank you.

I was hoping someone could help me.

I am trying to create a series of plots from a large data set.

But every plot has a different set of X & Y values.

In the attachment I want to plot Column 5 with Column 6 for rows between 0 and 20.

The next plot would start also plot Column 5 with Column 6 but rows between 21 and 41.

The code I have is as follows:-

axes[0].plot((range(int((df_raw_data.iloc[start_counter,5])),(int(df_raw_data.iloc[end_counter,5])))),(range((int(df_raw_data.iloc[start_counter,6])),(int(df_raw_data.iloc[end_counter,6])))))

I loop through the dataset making start_counter = 0 and end_counter = 20 and once i plot the data i set start_counter = 21 and end_counter = 41 (thats the idea anyway).

The problem is that i keep getting the following error:-

File "C:\Analysis.py", line 81, in Ploting_data axes[0].plot((range(int((df_raw_data.iloc[start_counter,5])),(int(df_raw_data.iloc[end_counter,5])))),(range((int(df_raw_data.iloc[start_counter,6])),(int(df_raw_data.iloc[end_counter,6]))))) File "C:\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 1743, in plot lines = [*self._get_lines(*args, data=data, **kwargs)] File "C:\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 273, in __call__ yield from self._plot_args(this, kwargs) File "C:\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 399, in _plot_args raise ValueError(f"x and y must have same first dimension, but " ValueError: x and y must have same first dimension, but have shapes (1761,) and (0,)Can some help point me in the right direction?

Thank you.