本文整理匯總了Python中pandas.scatter_matrix方法的典型用法代碼示例。如果您正苦於以下問題:Python pandas.scatter_matrix方法的具體用法?Python pandas.scatter_matrix怎麽用?Python pandas.scatter_matrix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pandas
的用法示例。
在下文中一共展示了pandas.scatter_matrix方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: plot_scatter_matrix
# 需要導入模塊: import pandas [as 別名]
# 或者: from pandas import scatter_matrix [as 別名]
def plot_scatter_matrix(self, freq=None, title=None,
figsize=(10, 10), **kwargs):
"""
Wrapper around pandas' scatter_matrix.
Args:
* freq (str): Data frequency used for display purposes.
Refer to pandas docs for valid freq strings.
* figsize ((x,y)): figure size
* title (str): Title if default not appropriate
* kwargs: passed to pandas' scatter_matrix method
"""
if title is None:
title = self._get_default_plot_title(
freq, 'Return Scatter Matrix')
plt.figure()
ser = self._get_series(freq).to_returns().dropna()
pd.scatter_matrix(ser, figsize=figsize, **kwargs)
return plt.suptitle(title)
示例2: test_scatter_plot_legacy
# 需要導入模塊: import pandas [as 別名]
# 或者: from pandas import scatter_matrix [as 別名]
def test_scatter_plot_legacy(self):
df = pd.DataFrame(randn(100, 2))
with tm.assert_produces_warning(FutureWarning):
plotting.scatter_matrix(df)
with tm.assert_produces_warning(FutureWarning):
pd.scatter_matrix(df)
示例3: _scatterMatrixAct
# 需要導入模塊: import pandas [as 別名]
# 或者: from pandas import scatter_matrix [as 別名]
def _scatterMatrixAct(self):
df = self.getNumberDataFrame()
if df is None: return
DyMatplotlib.newFig()
pd.scatter_matrix(df)
plt.gcf().show()
示例4: test_scatter_plot_legacy
# 需要導入模塊: import pandas [as 別名]
# 或者: from pandas import scatter_matrix [as 別名]
def test_scatter_plot_legacy(self):
tm._skip_if_no_scipy()
df = pd.DataFrame(randn(100, 2))
with tm.assert_produces_warning(FutureWarning):
plotting.scatter_matrix(df)
with tm.assert_produces_warning(FutureWarning):
pd.scatter_matrix(df)