As discussed in issue #6515 dotted grid lines do not appear dotted but dashed.
This has not changed in version 2.0.0.
Could you please restore the dotted appearance as seen in earlier versions?
The current appearance is not satisfying.
Maybe, but people don't want to waste time fixing stuff before they can use it. Matplotlib should be provided ready for use and not misconfigured. Most people mean a dotted line if they say so. But currently they don't get it. People don't know the settings for a dotted line nor do they have time to figure it out.
To me the dot frequency looks too high. Now it almost looks like a solid line. The classic version looked different. Can we not just restore the classic appearance? That was ok. See the example below.
You can also pass a dash pattern directly to grid to get what ever pattern you want.
There is no set of defaults which will make all users of Matplotlib happy at all times, there are simply too many different use cases (and too many users). Sorry that you have a case where they do not work well, but there is more than enough flexibility in the library to get your desired outcome.
As a reminder, a vast majority of the work done on Matplotlib is done by volunteers on their own time.
Thank you for pointing things out.
But is there any reason to make the doted line in 2.0 not look as good as in the classic version?
I think that matplotlib should provide plots in publication quality on a professional level. That includes avoiding referee complaints about difficult to distinguish line styles. Matplotlib should make this most obvious and less number of dots for a dotted line would put it on the safer side.
If I understood correctly, the new line styles are the results of discussions from #5917 and #5926 . One of the arguments was that the dotted style had a significantly smaller visual weight than the other line styles.
Thanks for pointing this out.
I think also the other line styles presented there need more space. The gaps are too small.
This makes it harder to distinguish them.
You can use, ax.grid(color='r', linestyle='dotted', linewidth=2)
There are more linestyle as linestyle_str = [
('solid', 'solid'), # Same as (0, ()) or '-'
('dotted', 'dotted'), # Same as (0, (1, 1)) or ':'
('dashed', 'dashed'), # Same as '--'
('dashdot', 'dashdot')] # Same as '-.'
Activity
dstansby commented on Jan 30, 2017
I would agree that they don't quite look dotted to me. From #6515,
For me (on current master) this currently gives:

tacaswell commented on Jan 30, 2017
You can configure this however you wish: http://matplotlib.org/users/dflt_style_changes.html#plot
fkbreitl commented on Jan 30, 2017
Maybe, but people don't want to waste time fixing stuff before they can use it. Matplotlib should be provided ready for use and not misconfigured. Most people mean a dotted line if they say so. But currently they don't get it. People don't know the settings for a dotted line nor do they have time to figure it out.
tacaswell commented on Jan 30, 2017
Flagged as critical as we need to make a decision on this one way or the other.
dopplershift commented on Jan 31, 2017
Yeah, I'll agree that I don't think we should really be calling those lines dotted.
tacaswell commented on Feb 6, 2017
Clipping at 0.5 in the scaling:
tacaswell commented on Feb 6, 2017
clipping at 1.0
tacaswell commented on Feb 6, 2017
clipping at 1.5
dstansby commented on Feb 6, 2017
I think both the 0.5 and 1 cases look good. It would also be worth checking over a range of line widths.
tacaswell commented on Feb 6, 2017
Clipping at 1 and range of lw
tacaswell commented on Feb 6, 2017
talking to @dopplershift we are going to adjust the clipping to 1.
dstansby commented on Feb 6, 2017
API: change the minimum line-width used for dash scaling
fkbreitl commented on Feb 7, 2017
To me the dot frequency looks too high. Now it almost looks like a solid line. The classic version looked different. Can we not just restore the classic appearance? That was ok. See the example below.
tacaswell commented on Feb 7, 2017
If you do not want to use the 2.0 styles, there is a classic style sheet available (the first thing documented in http://matplotlib.org/users/dflt_style_changes.html#changes-to-the-default-style ).
See http://matplotlib.org/users/dflt_style_changes.html#plot for how to selectively revert the changes to the classic patterns and disable the scaling with line width.
You can also pass a dash pattern directly to grid to get what ever pattern you want.
There is no set of defaults which will make all users of Matplotlib happy at all times, there are simply too many different use cases (and too many users). Sorry that you have a case where they do not work well, but there is more than enough flexibility in the library to get your desired outcome.
As a reminder, a vast majority of the work done on Matplotlib is done by volunteers on their own time.
fkbreitl commented on Feb 7, 2017
Thank you for pointing things out.
But is there any reason to make the doted line in 2.0 not look as good as in the classic version?
I think that matplotlib should provide plots in publication quality on a professional level. That includes avoiding referee complaints about difficult to distinguish line styles. Matplotlib should make this most obvious and less number of dots for a dotted line would put it on the safer side.
afvincent commented on Feb 7, 2017
If I understood correctly, the new line styles are the results of discussions from #5917 and #5926 . One of the arguments was that the dotted style had a significantly smaller visual weight than the other line styles.
fkbreitl commented on Feb 7, 2017
Thanks for pointing this out.
I think also the other line styles presented there need more space. The gaps are too small.
This makes it harder to distinguish them.
API: Remove minimum line-width used for dash scaling
API: Remove lw clipping for dash scaling and tweak pattern
ankitkumar-pi commented on Mar 19, 2022
You can use, ax.grid(color='r', linestyle='dotted', linewidth=2)
There are more linestyle as
linestyle_str = [
('solid', 'solid'), # Same as (0, ()) or '-'
('dotted', 'dotted'), # Same as (0, (1, 1)) or ':'
('dashed', 'dashed'), # Same as '--'
('dashdot', 'dashdot')] # Same as '-.'