本文整理汇总了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)