You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
df=self.getStats() # returns a dataFrame with a row called RoundstotalMatches=len(df)
if (totalMatches==0):
print("Need to play at least one match for a graph", flush=True)
returnvc=df["Rounds"].value_counts()
x=vc.plot(legend=True, figsize=[10, 8])
x.set_xlabel("Number of Rounds to Win")
x.set_ylabel("Occurrences")
x.set_title("Value-Count Graph (Matches: "+str(totalMatches) +")")
Occurences=max(vc) +1# for small values set y tic mark textifOccurences<=20:
yText= [] # Stores our Y-Axis textforiinrange(1, Occurences):
yText.append(f'${i}$')
plt.yticks(np.arange(1, Occurences), yText, ha="center")
plt.show()
The code above works fine unless the following has been executed to make "popout" graphs
%matplotlib qt5
If a previous graph exists from a previous run, and is still up. Then this graph will have additions added directly to it. Please see the images for what is happening.
It should be noted, I am using version 0.25.3 of pandas, and I searched and could not find this issue already logged.
The reason this is an issue is that it leads to potentially different results each time the program is executed.
It only occurs with pandas Series objects. (I tested and it is not an issue for dataFrames.)
There is a work around and I have applied it in my program.
change the statement:
x = vc.plot(legend=True, figsize=[10, 8])
to these two statments:
plt.figure(figsize=(10, 8))
x = vc.plot.line(legend=True) # no point in having the figsize defined twice
Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!
Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.
For documentation-related issues, you can check the latest versions of the docs on master here:
@RickOldenburger can you provide a minimal example when you file issues?
IIUC, the question is about Series.plot vs. DataFrame.plot different w.r.t. plotting on an existing axis. If so, that's discussed in #8776. Let me know if I misunderstood.
Hi Tom, thanks for the quick reply.
The reason I opened a new issue is that I considered issue #8776
<#8776> to be occurring only
when the application was still running. (perhaps, is misunderstood...)
IE. I already had graph up in the current running application. In fact, in
this scenario, I believe that the dataFrame should be changed to work like
the Series.
My scenario occurs with a graph that is present after the application has
finished executing. This will result in a graph (that could theoretically
be a graph launched from an entirely different application) being affected
that is not related to the current execution. This will result in an
execution having different results depending on what graphs, if any, are
currently active.
Best regards,
Rick
On Fri, Jan 17, 2020 at 3:16 PM Tom Augspurger ***@***.***> wrote:
@RickOldenburger <https://github.com/RickOldenburger> can you provide a
minimal example when you file issues?
IIUC, the question is about Series.plot vs. DataFrame.plot different
w.r.t. plotting on an existing axis. If so, that's discussed in #8776
<#8776>. Let me know if I
misunderstood.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31086?email_source=notifications&email_token=AOJIXEUNCP6CPIGUR5ZCLHLQ6INZLA5CNFSM4KHZXG42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJI7U2Q#issuecomment-575797866>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOJIXETRFRS3YG5ZNMNHUBTQ6INZLANCNFSM4KHZXG4Q>
.
Code Sample, a copy-pastable example if possible
The code above works fine unless the following has been executed to make "popout" graphs
%matplotlib qt5
If a previous graph exists from a previous run, and is still up. Then this graph will have additions added directly to it. Please see the images for what is happening.
It should be noted, I am using version 0.25.3 of pandas, and I searched and could not find this issue already logged.
You can find the full python program at:
https://github.com/RickOldenburger/War-Card-Game-Analysis
There is a work around and I have applied it in my program.
change the statement:
x = vc.plot(legend=True, figsize=[10, 8])
to these two statments:
plt.figure(figsize=(10, 8))
x = vc.plot.line(legend=True) # no point in having the figsize defined twice
Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!
Note: Many problems can be resolved by simply upgrading
pandas
to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check ifmaster
addresses this issue, but that is not necessary.For documentation-related issues, you can check the latest versions of the docs on
master
here:https://pandas-docs.github.io/pandas-docs-travis/
If the issue has not been resolved there, go ahead and file it in the issue tracker.
Expected Output
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]The text was updated successfully, but these errors were encountered: