matlab 直方图图,[转载]matlab的scatterhist 用法--将散点图和直方图结合!

本文介绍了如何在matlab中使用scatterhist函数将散点图和直方图结合。scatterhist需要相同维度的x和y数据,参数包括'NBins'(设置直方图的单元格数量),'Location'(控制直方图的位置)和'Direction'(设定直方图的方向)。示例包括独立的正态和对数正态分布样本,不独立的均匀分布样本以及混合离散和连续数据的情况。
摘要由CSDN通过智能技术生成

scatter用来画散点图,而hist系列的函数是用来画直方图,具体应用可以在官网上找到。

要想把散点图和直方图结合起来,可以用scatterhist函数。

其中,用法如下:

scatterhist(x,y)

h = scatterhist(...)

scatterhist(...,'param1',val1,'param2',val2,...)

注意:x和y必须所含元素个数相同,即维数相同

参数可以有以下三种:

'NBins' — A scalar or a two-element vector

specifying the number of bins for the X and Y

histograms. The default is to compute the number of bins using

Scott's rule based on the sample standard deviation.

'Location' — A string controlling the location of the

marginal histograms within the figure. 'SouthWest' (the

default) plots the histograms below and to the left of the

scatterplot, 'SouthEast' plots them below and to the

right, 'NorthEast' above and to the right, and

'Nort

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值