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
{{ message }}
Repository navigation
Inconsistent linestyle specifications between Line2D and Patch artists #2136
Just noticed that to get a dashed line in a line plot:
plt.plot([1, 2, 3, 4], [1, 2, 3, 4], '--')
is completely different from how to specify a line style elsewhere, such as bar():
plt.bar([1, 2, 3, 4], [1, 2, 3, 4], ls='dashed')
It would make sense to me to normalize these two specifications together so that either "accent" of linestyle specifications would work anywhere a "linestyle" argument is accepted.
Hi. I would like to look into this issue. I am fairly new to Python and would love to take this opportunity to learn more about contributing to Python open-source projects.
Just wondering if it would require any C knowledge?
That would be great! This one will be a toughie. Not only will it require
code work, but documentation and tests will be needed as well.
We have a developer guide on our website that gives a basic idea on how to
contribute to matplotlib. Every project is a little different, but is
usually documented.
The api is rather inconsistent with respect to linestyles and dash patterns.
Before I'm going to implement something there, I need some clarification.
In collections.py linestyles are converted to dash patterns. Those are also returned be the get method.
In lines.py the dash pattern is in dashes "property". if dashes is set, the linestyle is "dashed".
patches do not support dashes at all at the moment.
How much backward compatibility should be preserved? To me it makes most sense to change either the collections or lines to reflect the same style, either convert to dashes or have a dashes property...
I would go with the approach of letting both forms of the linestyle
specifications be allowed in both places. This maintains backwards
compatibility and lets users use to either form "get what they expect".
The api is rather inconsistent with respect to linestyles and dash
patterns.
Before I'm going to implement something there, I need some clarification.
In collections.py linestyles are converted to dash patterns. Those
are also returned be the get method.
In lines.py the dash pattern is in dashes "property". if dashes is
set, the linestyle is "dashed".
patches do not support dashes at all at the moment.
How much backward compatibility should be preserved? To me it makes most
sense to change either the collections or lines to reflect the same style,
either convert to dashes or have a dashes property...
—
Reply to this email directly or view it on GitHub #2136 (comment)
.
Activity
pelson commentedon Sep 20, 2013
👍
ninjasoul commentedon Sep 28, 2013
Hi. I would like to look into this issue. I am fairly new to Python and would love to take this opportunity to learn more about contributing to Python open-source projects.
Just wondering if it would require any C knowledge?
WeatherGod commentedon Sep 28, 2013
That would be great! This one will be a toughie. Not only will it require
code work, but documentation and tests will be needed as well.
We have a developer guide on our website that gives a basic idea on how to
contribute to matplotlib. Every project is a little different, but is
usually documented.
ninjasoul commentedon Sep 28, 2013
Thanks. I will look into the developer guide.
lennart0901 commentedon Jul 10, 2014
ninjasoul are you still looking into this?
Otherwise, I'd take a shot.
ninjasoul commentedon Jul 11, 2014
lennart0901 go ahead. I've not been able to pursue this.
lennart0901 commentedon Jul 15, 2014
The api is rather inconsistent with respect to linestyles and dash patterns.
Before I'm going to implement something there, I need some clarification.
How much backward compatibility should be preserved? To me it makes most sense to change either the collections or lines to reflect the same style, either convert to dashes or have a dashes property...
WeatherGod commentedon Jul 15, 2014
I would go with the approach of letting both forms of the linestyle
specifications be allowed in both places. This maintains backwards
compatibility and lets users use to either form "get what they expect".
I wouldn't worry about patches at the moment.
On Tue, Jul 15, 2014 at 5:44 AM, lennart0901 notifications@github.com
wrote:
lennart0901 commentedon Jul 15, 2014
It did not mean I want to remove any way one can specify line/dash-patterns.
The question is what the getter-methods should return.