Skip to content

The parameter “fmt” doesn’t have the same behaviour in plot and plot_date #18141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevinlacaille opened this issue Jul 31, 2020 · 4 comments

Comments

@kevinlacaille
Copy link

In pyplot.plot, the parameter fmt defines basic formatting like color, marker and linestyle.

In pyplot.plot_date, the parameter fmt defines the plot format string.

This is inconsistency may lead to errors.

@tacaswell
Copy link
Member

@kevinlacaille Do you have an example that shows what you mean?

@timhoffm
Copy link
Member

It's not clear if that's meant, but here's the inconsisteny known for plot_date:

It's a known issue that the defaults of plot() an plot_date() are different (see #17548).
This can't/won't be fixed (#17548 (comment)).

If plot_date() causes confusion, we should really soft-depreacate it (#17548 (comment)).

@jklymak
Copy link
Member

jklymak commented Jul 31, 2020

Just to clarify: the fmt kwarg means exactly the same thing in plt.plot and plt.plot_date, but it has different defaults in each method.

@jklymak jklymak added the status: needs clarification Issues that need more information to resolve. label Jul 31, 2020
@kevinlacaille
Copy link
Author

It's not clear if that's meant, but here's the inconsisteny known for plot_date:

It's a known issue that the defaults of plot() an plot_date() are different (see #17548).

This can't/won't be fixed (#17548 (comment)).

If plot_date() causes confusion, we should really soft-depreacate it (#17548 (comment)).

I hadn't seen this issue. This is exactly what I was trying to convey - the default's are different, also pointed out by @jklymak , nice catch!

@jklymak jklymak removed the status: needs clarification Issues that need more information to resolve. label Aug 1, 2020
@jklymak jklymak closed this as completed Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants