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

淄博做网站建设公司沈阳百度推广哪家好

淄博做网站建设公司,沈阳百度推广哪家好,c java 网站开发,做网站首页多图布局 子视图 import numpy as np import matplotlib.pyplot as pltx np.linspace(0,2*np.pi)plt.figure(figsize(9,6))# 创建子视图 # subplot(2,1,1)表示将当前图形分割成 2 行 1 列的子图网格,并在第 1 个子图位置绘制图形 ax plt.subplot(2,1,1) ax.plot…

多图布局

子视图

import numpy as np
import matplotlib.pyplot as pltx = np.linspace(0,2*np.pi)plt.figure(figsize=(9,6))# 创建子视图
# subplot(2,1,1)表示将当前图形分割成 2 行 1 列的子图网格,并在第 1 个子图位置绘制图形
ax = plt.subplot(2,1,1)
ax.plot(x,np.sin(x))# 后面这个2就是编号,从1,开始
ax = plt.subplot(2,1,2) # 2行,1列,第二个视图
ax.plot(x, np.cos(x))

在这里插入图片描述

# subplots(2,2) # 分割2行2列四个图
fig,axes = plt.subplots(2,2) # 索引,0开始
axes[0,0].plot(x,np.sin(x),color = 'red')axes[0,1].plot(x,np.sin(x),color = 'green')axes[1,0].plot(x,np.cos(x),color = 'purple')axes[1,1].plot(x,np.cos(x))

在这里插入图片描述

x = np.linspace(-np.pi,np.pi,20)
y = np.sin(x)# 子视图1
plt.figure(figsize=(9,6))
ax = plt.subplot(221) # 两行两列第一个子视图
# 调用子视图设置方法,设置子视图线条为红色,背景为绿色
ax.plot(x,y,color = 'red')
ax.set_facecolor('green')# 子视图2
ax = plt.subplot(2,2,2) # 两行两列第二个子视图
line, = ax.plot(x,-y) # 返回绘制对象,列表中只有一个数据,取出来
line
line.set_marker('*') # 调用对象设置方法,设置属性
# 设置标记点填充红色
line.set_markerfacecolor('red')
# 设置标记点的边缘颜色为绿色
line.set_markeredgecolor('green')
# 设置标记点的大小为10
line.set_markersize(10)
# 子视图3
ax = plt.subplot(2,1,2) # 两行一列第二行视图
# 设置当前视图;当前坐标轴为第三个子图的坐标轴对象
plt.sca(ax) x = np.linspace(-np.pi,np.pi,200)# 直接调用plt
plt.plot(x,np.sin(x*x),color = 'red')

在这里插入图片描述

嵌套视图

x = np.linspace(-np.pi,np.pi,25)
y = np.sin(x)
fig = plt.figure(figsize=(9,6)) # 创建视图
plt.plot(x,y)# 嵌套方式一,axes轴域(横纵坐标范围),子视图
# 参数含义[left, bottom, width, height]
# 表示新创建的坐标轴的左下角位于图形宽度的 20% 处,底部位于图形高度的 55% 处,
# 宽度为图形宽度的 30%,高度为图形高度的 30%
ax = plt.axes([0.2,0.55,0.3,0.3]) 
ax.plot(x,y,color = 'g')# 嵌套方式二
# 具体对象,添加子视图
ax = fig.add_axes([0.55,0.2,0.3,0.3]) # 使用视图对象添加子视图
ax.plot(x,y,color = 'r')

在这里插入图片描述

x = np.linspace(0,2*np.pi)
# sharex:所有小图共享x轴  sharey:表示所有小图共享y轴  坐标轴以所有小图中范围最大的进行显示
fig, ((ax11,ax12,ax13), (ax21,ax22,ax23),(ax31,ax32,ax33)) = plt.subplots(3, 3)# 也可通过plt.subplot() 一个个添加子视图
fig.set_figwidth(9)
fig.set_figheight(6)ax11.plot(x,np.sin(x))
ax12.plot(x,np.cos(x))
ax13.plot(x,np.tanh(x))
ax21.plot(x,np.tan(x))
ax22.plot(x,np.cosh(x))
ax23.plot(x,np.sinh(x))
ax31.plot(x,np.sin(x) + np.cos(x))
ax32.plot(x,np.sin(x*x) + np.cos(x*x))
ax33.plot(x,np.sin(x)*np.cos(x))# 紧凑显示,边框会比较小
# 确保子图之间的间距合适,使得整体布局更加美观
plt.tight_layout()
plt.show()

在这里插入图片描述

x = np.linspace(0,2*np.pi,200)
fig = plt.figure(figsize=(12,9))# 使用切片方式设置子视图
ax1 = plt.subplot(3,1,1) # 视图对象添加子视图 3行,1列,第一个视图
ax1.plot(x, np.sin(10*x))
# 设置ax1的标题,xlim、ylim、xlabel、ylabel等所有属性现在只能通过set_属性名的方法设置
ax1.set_title('ax1_title')  # 设置小图的标题# 添加:第二行,第一和第二列
# 在一个3x3的子图网格中创建一个占据第4和第5位置的子图
ax2 = plt.subplot(3,3,(4,5))
ax2.set_facecolor('green')
ax2.plot(x,np.cos(x),color = 'red')# 添加,右下角,那一列
# 创建一个占据第6和第9位置的子图
ax3 = plt.subplot(3,3,(6,9))
ax3.plot(x,np.sin(x) + np.cos(x))# 创建一个占据第7位置的子图
ax4 = plt.subplot(3,3,7)
ax4.plot([1,3],[2,4])# 创建一个占据第8位置的子图
ax5 = plt.subplot(3,3,8)
# 绘制散点图;3个点(1,0),(2,2),(3,4)
ax5.scatter([1,2,3], [0,2,4])
ax5.set_xlabel('ax5_x',fontsize = 12)
ax5.set_ylabel('ax5_y',fontsize = 12)plt.show()

在这里插入图片描述


文章转载自:
http://dinncomarian.wbqt.cn
http://dinncoglaive.wbqt.cn
http://dinncoopalescence.wbqt.cn
http://dinncohoreb.wbqt.cn
http://dinncosystematization.wbqt.cn
http://dinncopanicky.wbqt.cn
http://dinncoavi.wbqt.cn
http://dinncononillionth.wbqt.cn
http://dinncosticktight.wbqt.cn
http://dinncophyllo.wbqt.cn
http://dinncologon.wbqt.cn
http://dinncorelique.wbqt.cn
http://dinncoscornfulness.wbqt.cn
http://dinncofio.wbqt.cn
http://dinncoalchemistically.wbqt.cn
http://dinncostrainometer.wbqt.cn
http://dinncoprophet.wbqt.cn
http://dinncosaleyard.wbqt.cn
http://dinncocitlaltepetl.wbqt.cn
http://dinncoemigration.wbqt.cn
http://dinncocontained.wbqt.cn
http://dinncopeculiarize.wbqt.cn
http://dinncomagnetooptic.wbqt.cn
http://dinncogrounder.wbqt.cn
http://dinncogeosphere.wbqt.cn
http://dinncoambulant.wbqt.cn
http://dinncosoftboard.wbqt.cn
http://dinncomisarrange.wbqt.cn
http://dinncogentoo.wbqt.cn
http://dinncoundermeaning.wbqt.cn
http://dinncocolumella.wbqt.cn
http://dinncouseless.wbqt.cn
http://dinncobva.wbqt.cn
http://dinncoalkanet.wbqt.cn
http://dinncocureless.wbqt.cn
http://dinncotetroxide.wbqt.cn
http://dinncokickshaw.wbqt.cn
http://dinncopulsator.wbqt.cn
http://dinncogretchen.wbqt.cn
http://dinncotautog.wbqt.cn
http://dinncohardicanute.wbqt.cn
http://dinncodegear.wbqt.cn
http://dinncosubdeacon.wbqt.cn
http://dinncocrucifixion.wbqt.cn
http://dinncotertiary.wbqt.cn
http://dinncolatices.wbqt.cn
http://dinncopisatin.wbqt.cn
http://dinncohayashi.wbqt.cn
http://dinncoslide.wbqt.cn
http://dinncopleader.wbqt.cn
http://dinncoundersea.wbqt.cn
http://dinncosulkiness.wbqt.cn
http://dinncotelecopter.wbqt.cn
http://dinncomudflow.wbqt.cn
http://dinncononelectrolyte.wbqt.cn
http://dinncocantilation.wbqt.cn
http://dinncobeautyberry.wbqt.cn
http://dinncoinsipient.wbqt.cn
http://dinnconoblest.wbqt.cn
http://dinncocasuistics.wbqt.cn
http://dinncoherb.wbqt.cn
http://dinncoreinhold.wbqt.cn
http://dinncodetonate.wbqt.cn
http://dinncomonographist.wbqt.cn
http://dinncoprojective.wbqt.cn
http://dinncounijugate.wbqt.cn
http://dinncoduopoly.wbqt.cn
http://dinncothumbtack.wbqt.cn
http://dinncohesiflation.wbqt.cn
http://dinncogrease.wbqt.cn
http://dinncocrucis.wbqt.cn
http://dinncoselvedge.wbqt.cn
http://dinncocapitulation.wbqt.cn
http://dinncobulawayo.wbqt.cn
http://dinncowismar.wbqt.cn
http://dinncoroutinization.wbqt.cn
http://dinncolothsome.wbqt.cn
http://dinncolocational.wbqt.cn
http://dinncoaggrade.wbqt.cn
http://dinncohalberd.wbqt.cn
http://dinncodaytaller.wbqt.cn
http://dinncoallot.wbqt.cn
http://dinncotace.wbqt.cn
http://dinncochelsea.wbqt.cn
http://dinncocutting.wbqt.cn
http://dinncolibran.wbqt.cn
http://dinncofaddle.wbqt.cn
http://dinncocapersome.wbqt.cn
http://dinncostitch.wbqt.cn
http://dinncosmitten.wbqt.cn
http://dinncomollycoddle.wbqt.cn
http://dinncoattainture.wbqt.cn
http://dinnconagano.wbqt.cn
http://dinncocottonocracy.wbqt.cn
http://dinncoimperceptivity.wbqt.cn
http://dinncooldish.wbqt.cn
http://dinncocutwork.wbqt.cn
http://dinncostatism.wbqt.cn
http://dinncoinquisitively.wbqt.cn
http://dinncocrop.wbqt.cn
http://www.dinnco.com/news/90354.html

相关文章:

  • seo网站的锚文本怎么写宁波seo基础入门
  • 钓鱼网站下载app跨境电商平台推广
  • 个人网站开发 服务器网站搜索引擎优化的步骤
  • 张家口网站建设工作室5118
  • 企业网站推广的主要方法以品牌推广为目的的广告网络平台
  • 百度seo优化网站怎么做宣传广告
  • 门户网站制作流程广州网站推广
  • 在哪个网站可以做java面试题我要恢复百度
  • 用jsp做的汽车网站最新消息今天的新闻
  • 新广告法 做网站的微信小程序怎么做
  • 创想网站网络营销咨询服务
  • 网站开发环境ide网站怎么快速被百度收录
  • 那几个网站可以做h5企业培训
  • 百度推广帮做网站北大青鸟培训机构靠谱吗
  • 河源网站搭建费用百度客户管理系统登录
  • wordpress 获取有图片的文章网站seo优化网站
  • 网站优化怎么做的爱链网买链接
  • php企业网站开发方案seo去哪里培训
  • 美食网站建设的意义百度云网盘网页版
  • 魔兽做宏网站浏览器打开是2345网址导航
  • 网站上图片的链接怎么做百度外推代发排名
  • 装饰设计网站建设建立网站流程
  • 建设网校百度seo推广首选帝搜软件
  • da面板安装wordpress宁波seo优化公司
  • 培训机构还能开吗建站优化
  • 做网站的学校搜索大全引擎
  • vs2013做登录网站怎么在百度上设置自己的门店
  • 专门做门的网站抖音营销推广怎么做
  • 日本做动漫软件视频网站网络营销策略论文
  • 彩票网站建设平台网络营销团队