本文簡要介紹 python 語言中 matplotlib.cbook.pts_to_midstep
的用法。
-
將實線轉換為mid-steps。
給定一組
N
點轉換為2N
點,這些點在線性連接時會給出一個階躍函數,該函數會在間隔中間改變值。- 參數:
- x 數組
-
台階的 x 位置。可能是空的。
- y1, ..., yp 數組
-
y 數組要變成步驟; all 的長度必須與
x
相同。
- 返回:
- 數組
-
x 和 y 值以與輸入相同的順序轉換為步長;可以解壓縮為
x_out, y1_out, ..., yp_out
。如果輸入的長度是N
,那麽這些數組中的每一個都將是長度2N
。
例子
>>> x_s, y1_s, y2_s = pts_to_midstep(x, y1, y2)
用法
matplotlib.cbook.pts_to_midstep(x, *args)
相關用法
- Python matplotlib pts_to_poststep用法及代碼示例
- Python matplotlib pts_to_prestep用法及代碼示例
- Python matplotlib plot用法及代碼示例
- Python matplotlib axvspan用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- Python matplotlib triplot用法及代碼示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib boxplot用法及代碼示例
- Python matplotlib subplots用法及代碼示例
- Python matplotlib InsetPosition用法及代碼示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代碼示例
- Python matplotlib Figure.set_size_inches用法及代碼示例
- Python matplotlib figlegend用法及代碼示例
- Python matplotlib Axes.step用法及代碼示例
- Python matplotlib Axes.contour用法及代碼示例
- Python matplotlib LassoSelector用法及代碼示例
- Python matplotlib BrokenBarHCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib MovieWriterRegistry.register用法及代碼示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib warn_deprecated用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.cbook.pts_to_midstep。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。