SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: per f. <per...@gm...> - 2010年01月30日 19:01:42
hi all,
I am plotting certain dashed lines in matplotlib, using:
plt.plot(x, y, '--')
I'd like to set the dash size (i.e. length of each dash) and the gap
between the dashes of the plotted line. Is there a way to set this
from matplotlib?
thanks.
From: Eric F. <ef...@ha...> - 2010年01月30日 21:37:41
per freem wrote:
> hi all,
> 
> I am plotting certain dashed lines in matplotlib, using:
> 
> plt.plot(x, y, '--')
> 
> I'd like to set the dash size (i.e. length of each dash) and the gap
> between the dashes of the plotted line. Is there a way to set this
> from matplotlib?
plt.plot([0,1], [2,3], '--', dashes=(10,20))
The dashes kwarg sets a Line2D parameter. See
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D.set_dashes
Eric
> 
> thanks.
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /