Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
In#7087@rougier asked about changing the defaultdash_capstyle
to 'round'. This is what it would look like on top of the rest of the changes.
importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlibasmplfromcyclerimportcyclerfig, (ax1,ax2)=plt.subplots(1,2,figsize=(6,3))N=15x=np.arange(N)y=np.ones_like(x)sty_cycle= (cycler('ls', ['--' ,':','-.'])*cycler('lw', [None,1,2,5]))classic= {'lines.dash_capstyle':'butt'}v2= {'lines.dash_capstyle':'round'}defdemo(ax,rcparams,title):ax.axis('off')ax.set_title(title)withmpl.rc_context(rc=rcparams):forj,styinenumerate(sty_cycle):ax.plot(x,y+j,**sty)demo(ax1,classic,'v2.0')demo(ax2, {},'v2.0 + rounded')
I am not a huge fan of the rounded caps, it is barely noticeable at small line widths and looks worse at large linewidths (IMO).
It would also require re-doing the dash patterns.