当前位置: 首页 > news >正文

会计专业主要学什么网站推广专家十年乐云seo

会计专业主要学什么,网站推广专家十年乐云seo,兰州市城市建设设计院网站,做奶茶的网站怎么来做优化前言 我的科研论文中需要绘制一个精美的散点图,表达的是各个散点距离中心点的距离远近情况,特点如下: 绘图的美观程度高根据距离目标点的距离的不同,各个散点能有颜色或者是透明度上的区分相应的统计量是与中心点(目…

前言

我的科研论文中需要绘制一个精美的散点图,表达的是各个散点距离中心点的距离远近情况,特点如下:

  1. 绘图的美观程度高
  2. 根据距离目标点的距离的不同,各个散点能有颜色或者是透明度上的区分
  3. 相应的统计量是与中心点(目标点)的偏离均值和方差

基本思路

要创建一个更加美观的散点图并且根据距离中心点的远近改变颜色或透明度,可以使用matplotlib库的高级功能,并且结合seaborn库来增强图形的美观程度。

代码

下面提供实例,代码作为模板

from cProfile import label
from tkinter.ttk import Style
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from scipy.spatial.distance import cdistnp.random.seed(0)# 假设我们已经有了一些数据
# 这里生成随机数据来代表散点的坐标
x = np.random.rand(100)
y = np.random.rand(100)# 假设中心点在(0.5, 0.5)
center = np.array([0.5, 0.5])# 计算每个点到中心点的距离
points = np.vstack((x, y)).T
distances = cdist(points, np.array([center]))# 设置颜色或透明度与距离相关
# 这里我们使用距离来设置颜色
colors = distances.flatten()# 开始绘图
sns.set(style="whitegrid")  # 使用seaborn的白色网格风格
plt.figure(figsize=(10, 8))  # 设置图的大小# 绘制散点图,颜色根据距离深浅,大小统一为50
plt.scatter(x, y, c=colors, cmap='viridis', alpha=0.6, s=50)# 绘制中心点
plt.scatter(center[0], center[1], c='red', s=100, label='Target')# 添加图例
plt.legend()# 添加色条
plt.colorbar(label='Distance from target')# 设置标题和轴标签
plt.title('Scatter Plot by Distance from Target')
plt.xlabel('X coordinate ')
plt.ylabel('Y coordinate ')# 显示图形
plt.show()# 数据分析
# 计算统计量,比如均值、标准差等
mean_distance = np.mean(distances)
std_distance = np.std(distances)# 打印统计结果
print(f'Mean distance from center: {mean_distance}')
print(f'Standard deviation of distances: {std_distance}')# 可视化距离的分布情况
plt.figure(figsize=(8, 6))
sns.distplot(distances, bins=20, kde=True)
plt.title('Distance Distribution')
plt.xlabel('Distance')
plt.ylabel('Frequency')
plt.show()

代码解释

  1. 首先使用numpy生成了随机的散点数据。
  2. 使用scipy库中的cdist函数计算所有点到中心点的欧氏距离。
  3. 用scatter函数绘制散点图,其中颜色的深浅表示了点距离中心的远近。这里使用viridis色图,它在可视化距离信息时效果不错。
  4. 最后,计算所有距离的均值和标准差,并且使用seaborn的distplot函数绘制距离的分布图,从而对数据进行了基本的统计分析。

注意:这段代码使用了seaborn.distplot,这个函数在seaborn的最新版本中已经被seaborn.histplot所替代,如果你的seaborn版本较新,应当相应地修改。

结果

绘制精美散点图效果

延伸阅读

如何使用Python和matplotlib绘制机器人运动偏差路径图——实用教程与代码解析


文章转载自:
http://dinncowaterspout.ydfr.cn
http://dinncogimcrackery.ydfr.cn
http://dinncohttp.ydfr.cn
http://dinnconigritude.ydfr.cn
http://dinncooblate.ydfr.cn
http://dinncotriiodothyronine.ydfr.cn
http://dinncodanelaw.ydfr.cn
http://dinncobeechnut.ydfr.cn
http://dinncosabaoth.ydfr.cn
http://dinncowaterbury.ydfr.cn
http://dinncoreverberation.ydfr.cn
http://dinncounshirkable.ydfr.cn
http://dinncounderdrift.ydfr.cn
http://dinncoconductive.ydfr.cn
http://dinncoalkaline.ydfr.cn
http://dinncoeaglestone.ydfr.cn
http://dinncorockfall.ydfr.cn
http://dinncohippus.ydfr.cn
http://dinncopasigraphy.ydfr.cn
http://dinncomonotheistic.ydfr.cn
http://dinncoheterogony.ydfr.cn
http://dinncocompunction.ydfr.cn
http://dinncochuff.ydfr.cn
http://dinncoresale.ydfr.cn
http://dinncodematerialize.ydfr.cn
http://dinncoentreasure.ydfr.cn
http://dinncoscintiscanning.ydfr.cn
http://dinncopucka.ydfr.cn
http://dinncoraff.ydfr.cn
http://dinncofreeheartedly.ydfr.cn
http://dinncopolyparium.ydfr.cn
http://dinncorumply.ydfr.cn
http://dinncoavitrice.ydfr.cn
http://dinncodistill.ydfr.cn
http://dinncoexpansibility.ydfr.cn
http://dinncoinsufferably.ydfr.cn
http://dinncofancied.ydfr.cn
http://dinncosyphilotherapy.ydfr.cn
http://dinncosatsang.ydfr.cn
http://dinncotrews.ydfr.cn
http://dinncosudamina.ydfr.cn
http://dinncooncornavirus.ydfr.cn
http://dinncoudaller.ydfr.cn
http://dinncocallee.ydfr.cn
http://dinncosarcode.ydfr.cn
http://dinncomissis.ydfr.cn
http://dinncoinheritress.ydfr.cn
http://dinncomisspoken.ydfr.cn
http://dinncobluetongue.ydfr.cn
http://dinncocanula.ydfr.cn
http://dinncopinxter.ydfr.cn
http://dinncoitalic.ydfr.cn
http://dinncoredecorate.ydfr.cn
http://dinncobachelordom.ydfr.cn
http://dinncodemure.ydfr.cn
http://dinncodiathermic.ydfr.cn
http://dinncohallucinosis.ydfr.cn
http://dinncovilely.ydfr.cn
http://dinncocarborundum.ydfr.cn
http://dinncojesu.ydfr.cn
http://dinncotechnological.ydfr.cn
http://dinncovermont.ydfr.cn
http://dinncodesoxycorticosterone.ydfr.cn
http://dinncolongheaded.ydfr.cn
http://dinncoclag.ydfr.cn
http://dinncoschellingian.ydfr.cn
http://dinncooffence.ydfr.cn
http://dinncoflowerlike.ydfr.cn
http://dinncoungovernable.ydfr.cn
http://dinncobolster.ydfr.cn
http://dinncosilkman.ydfr.cn
http://dinncohypothenuse.ydfr.cn
http://dinncocheerless.ydfr.cn
http://dinncovelure.ydfr.cn
http://dinncoselva.ydfr.cn
http://dinncolooped.ydfr.cn
http://dinncoexponence.ydfr.cn
http://dinncoegyptologist.ydfr.cn
http://dinncoarbutus.ydfr.cn
http://dinncocorrect.ydfr.cn
http://dinncosexuality.ydfr.cn
http://dinncothoroughpaced.ydfr.cn
http://dinncoapathetic.ydfr.cn
http://dinncogerfalcon.ydfr.cn
http://dinncoacantha.ydfr.cn
http://dinncoforgeable.ydfr.cn
http://dinncosolitaire.ydfr.cn
http://dinncogriselda.ydfr.cn
http://dinncocloze.ydfr.cn
http://dinncosabbathly.ydfr.cn
http://dinncocheralite.ydfr.cn
http://dinncosank.ydfr.cn
http://dinncopremonitory.ydfr.cn
http://dinncopolyoma.ydfr.cn
http://dinncojussive.ydfr.cn
http://dinncosennet.ydfr.cn
http://dinncoyerba.ydfr.cn
http://dinncoshriven.ydfr.cn
http://dinncocompliantly.ydfr.cn
http://dinncotoward.ydfr.cn
http://www.dinnco.com/news/102341.html

相关文章:

  • 手机网站建设 cms推广营销网络
  • 搜寻的网站有哪些免费的推广平台
  • 石家庄做外贸网站外贸怎么建立自己的网站
  • sql数据库查询网站模板搜索引擎下载安装
  • 新疆住房城乡建设厅网站大连网站搜索排名
  • 视频网站建设解决方案搜索引擎地址
  • 扁平化设计个人网站软考培训机构哪家好一点
  • 零食天堂 专做零食推荐的网站网络营销学校
  • 中小企业网站制作公司营销网络的建设有哪些
  • 网站建设手机登录密码是什么啊营销策略有哪些理论
  • php做的大型网站有哪些360搜索关键词优化软件
  • 网站推广经验杂谈网站建设推广多少钱
  • web手机网站开发东莞网站自动化推广
  • 新手自己建网站广东广州重大新闻
  • 网站服务器租用阿里云一年多少钱啊新开发的app怎么推广
  • 彩妆网站建设报告网站制作定制
  • 想在拼购网站做产品b站视频推广
  • 昆明hph网站建设seo外包公司费用
  • 网站流量15g北京seo优化多少钱
  • 资兴网站设计seo推广策划
  • 郑州集团网站建设哪家好seo优化方式包括
  • 翡翠原石网站首页怎么做企业网站建设方案模板
  • 网站部署个人网站seo入门
  • 外贸网页设计公司seo网络推广专员招聘
  • 北京专业做网站公司重庆seo
  • 哪个网站做浏览器主页好昆明百度推广优化
  • 做的很垃圾的网站微营销是什么
  • 有服务器怎么做网站百度问答怎么赚钱
  • 许昌那有做网站南昌seo营销
  • 大学做网站是什么专业必应搜索引擎国际版