echarts splitLine lineStyle

Examples - Apache ECharts

					splitLine :
					{
						show : true
					},
					lineStyle : 
					{
						type : 'dashed',
						color : '#5555555'
					}

echarts_03_bar_01.html

<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
	<div id="container" style="height: 100%; background: white;"></div>
	<script type="text/javascript" src="echarts.min.js"></script>
	<script type="text/javascript">
		/*-------------------------- +
		 http://127.0.0.1:8089/PrjJsp/echarts/echarts_03_bar_01.html
		+-------------------------- */
		function randomInt(min, max)
		{
			return min + Math.floor(Math.random() * (max - min + 1));
		}
		var arrData = [];
		for (var i = 0; i < 12; i++)
		{
			arrData.push(randomInt(0, 100));
		}
	
		//
		var dom = document.getElementById("container");
		var myChart1 = echarts.init(dom);
		option =
		{
			grid: {
// 		        show: false,                //是否显示图表背景网格    
// 		        left: '0%',                //图表距离容器左侧多少距离
// 		        right: '40%',              //图表距离容器右侧侧多少距离
// 		        bottom: '3%',              //图表距离容器上面多少距离
// 		        top: 100,                  //图表距离容器下面多少距离
// 		        containLabel: true,        //防止标签溢出  
// 		        backgroundColor:'#555555', //网格背景色,默认透明
		    },
			title :
			{
				text : '某地区降水量',
				subtext : '纯属虚构'
			},
			tooltip :
			{
// 				trigger : 'axis'
			},
			xAxis :
			[
				{
					type : 'category',
					data :
					[
						'1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'
					],
					splitLine :
					{
						show : true
					},
					axisTick :
					{
// 						alignWithLabel : true
					},
					lineStyle : 
					{
						type : 'dashed',
						color : '#5555555'
					}
				}
			],
			yAxis :
			[
				{
					type : 'value',
					splitLine :
					{
						show : true
					},
					splitArea :
					{
						show : true,
					},
					lineStyle : 
					{
						type : 'dashed',
						color : '#5555555'
					}
				}
			],
			series :
			[
				{
					name : '降水量',
					type : 'bar',
					label :
					{
						normal :
						{
							show : true,
							position : 'top'
						}
					},
					itemStyle :
					{
						normal :
						{
							// 定制显示(按顺序)
							color : function(params)
							{
								var colorList =
								[
									'#C33531', '#EFE42A', '#64BD3D', '#EE9201', '#29AAE3', '#B74AE5', '#0AAF9F', '#E89589', '#16A085', '#4A235A', '#C39BD3 ', '#F9E79F', '#BA4A00', '#ECF0F1',
									'#616A6B', '#EAF2F8', '#4A235A', '#3498DB'
								];
								
								return colorList[params.dataIndex]
							},
					
							// 随机显示
							color : function(d)
							{
								return "#" + Math.floor(Math.random() * (256*256*256-1)).toString(16);
							}
						},
					},
					data :
					[
						32.6, 25.9, 39.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 58.8, 16.0, 32.3
					],
					data : arrData
				}
			]
		};

		if (option && typeof option === "object")
		{
			myChart1.setOption(option, true);
		}
	</script>
</body>
</html>

  • 7
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
app.title = '气泡图'; var data = [ [['2015/1/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/1/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2016/5/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2017/6/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2018/9/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2019/2/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2019/5/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',10,'0','系列"游戏1"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/1/6',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/24',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2017/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2018/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2019/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2019/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2019/1/1',20,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/23',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/2/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/3/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/4/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2017/5/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2018/6/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',30,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/23',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2016/2/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2016/3/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2016/4/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2017/5/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2018/6/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',40,'0','系列"游戏2"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/23',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/2/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/3/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2016/4/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2017/5/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2019/6/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',50,'0','系列"游戏3"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/23',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/2/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/3/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/4/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2017/5/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2018/6/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',60,'0','系列"在游戏2范围内"点"2015/01/01(2015/01/01,0.6)"']], [['2015/1/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/2/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/3/23',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/4/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/5/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/6/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/7/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/8/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/9/14',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/10/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/11/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2015/12/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/1/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/2/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/3/16',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2016/4/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2017/5/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2018/6/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"'], ['2019/7/1',70,'0','系列"在游戏3范围内"点"2015/01/01(2015/01/01,0.6)"']] ]; option = { backgroundColor: new echarts.graphic.RadialGradient(0.3, 0.3, 0.8, [{ offset: 0, color: '#f7f8fa' }, { offset: 1, color: '#cdd0d5' }]), title: { text: '2015年装备重大游戏1与/游戏2情况统计', subtext:'', x:'center', y:'top', textAlign:'center' }, legend: { orient: 'horizontal', // 'vertical' x: 'center', // 'center' | 'left' | {number}, y: 'bottom', // 'center' | 'bottom' | {number} //backgroundColor: '#fff', // borderColor: 'rgba(178,34,34,0.8)', // borderWidth: 4, padding: 5, // [5, 10, 15, 20] itemGap: 20, data: ['游戏1', '游戏2', '游戏3', '游戏2', '游戏3', '在游戏2范围内', '在游戏3范围内'] }, xAxis: { type: 'time', name:'时间', splitLine: { show: true, lineStyle:{ color: ['#315070'], width: 1, type: 'solid' }   } }, yAxis: { type: 'value', name:'类型', axisLabel:{ formatter : function(params){ return ""; } }, splitLine: { show: true, lineStyle:{ color: ['#4c5055'], width: 1, show:false, type: 'solid' }   } }, series: [{ //图形 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' name: '游戏1', data: data[0], type: 'scatter', symbol:"triangle", symbolSize:12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(80, 56, 50, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(76, 80, 85)' }, { offset: 1, color: 'rgb(85, 85, 72)' }]) } } }, { name: '游戏2', data: data[1], type: 'scatter', symbol:"rect", symbolSize: 12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(250, 196, 122, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(250, 139, 35)' }, { offset: 1, color: 'rgb(246, 144, 25)' }]) } } }, { name: '游戏3', data: data[2], type: 'scatter', symbol:"rect", symbolSize:12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(25, 100, 150, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(63, 167, 228)' }, { offset: 1, color: 'rgb(62, 157, 207)' }]) } } }, { name: '游戏2', data: data[3], type: 'scatter', symbol:"circle", symbolSize:12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(250, 196, 122, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(250, 139, 35)' }, { offset: 1, color: 'rgb(246, 144, 25)' }]) } } }, { name: '游戏3', data: data[4], type: 'scatter', symbol:"circle", symbolSize: 12, label: { emphasis: { show: true, formatter:15, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(25, 100, 150, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(63, 167, 228)' }, { offset: 1, color: 'rgb(62, 157, 207)' }]) } } }, { name: '在游戏2范围内', data: data[5], type: 'scatter', symbol:"diamond", symbolSize: 12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(250, 196, 122, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(250, 139, 35)' }, { offset: 1, color: 'rgb(246, 144, 25)' }]) } } }, { name: '在游戏3范围内', data: data[6], type: 'scatter', symbol:"diamond", symbolSize: 12, label: { emphasis: { show: true, formatter: function (param) { return param.data[3]; }, position: 'top' } }, itemStyle: { normal: { shadowBlur: 10, shadowColor: 'rgba(25, 100, 150, 0.5)', shadowOffsetY: 5, color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{ offset: 0, color: 'rgb(63, 167, 228)' }, { offset: 1, color: 'rgb(62, 157, 207)' }]) } } } ] };
⼤数据可视化(五)关系数据可视化 关系数据具有关联性与分布性 数据的关联性 数据的关联性 两个量化数据之间的数理关系 通过数据关联性可已根据⼀个已知的数值变化来预测另⼀个数值的变化。 散点图 散点图 正相关、负相关、不相关 # 散点图 crime = pd.read_csv("data/crimeRatesByState2005.csv") ( Scatter() .add_xaxis(crime["murder"]) .add_yaxis("", crime["burglary"]) .set_global_opts( title_opts=opts.TitleOpts(title="谋杀案和⼊室盗窃案的关联性散点图",pos_left="center"), xaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True),name="谋杀案",name_location="middle",name_gap=30), yaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True),name="⼊室盗窃案",name_location="center",name_gap=50), legend_opts=opts.LegendOpts(is_show=False) ) .set_series_opts(label_opts=opts.LabelOpts(is_show=False)) .render("result/5-2.html") ) #matplotlib实现 crime = pd.read_csv("data/crimeRatesByState2005.csv") crime=crime[crime.state!="United States"] crime=crime[crime.state!="District of Columbia"] plt.scatter(crime["murder"],crime["burglary"]) plt.show() 散点图矩阵 散点图矩阵 同时绘制多个变量间的散点图,快速发现变量间的相关性 #散点图矩阵 crime = pd.read_csv("data/crimeRatesByState2005.csv") crime=crime[crime.state!="United States"] crime=crime[crime.state!="District of Columbia"] crime=crime.drop(["population"],axis=1) crime=crime.drop(["state"],axis=1) g=sns.pairplot(crime,diag_kind="kde",kind='reg')#kde密度曲线reg拟合曲线 plt.show() ⽓泡图 ⽓泡图 由⼤⼩不同的标记表⽰,便于⽐较三个变量 数据的分布性 数据的分布性 可视化图⼏乎可以表⽰所有数据的内容,并且将数据分布的情况也呈现。 例如曲线平坦,代表数据分布均匀;重⼼偏左,⼤部分数据取较低的数值;呈现正态分布。表⽰⼤部分数据在平均值附近。 茎叶图 茎叶图 可以⼀次完成统计分组和次数分配,是探索数据分析中对数据初步形象的描绘。 优点: 1. 统计图上没有原始数据的损失 2. 图中的数据可以随时记录和添加,⽅便使⽤ 直⽅图 直⽅图 ⾼度表⽰数值频率,宽度数值区间。 密度图 密度图 反映数据分布的密度情况。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值