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

用服务器如何做网站哪里有学电脑培训班

用服务器如何做网站,哪里有学电脑培训班,做网站软件A开头的,网站建设流程代理商详解matplotlib的color配置 Matplotlib可识别的color格式 格式举例RGB或RGBA,由[0, 1]之间的浮点数组成的元组,分别代表红色、绿色、蓝色和透明度(0.1, 0.2, 0.5), (0.1, 0.2, 0.5, 0.3不区分大小写的十六进制RGB或RGBA字符串。‘#0f0f0f’, ‘#0f0f0f…

详解matplotlib的color配置

Matplotlib可识别的color格式

格式举例
RGB或RGBA,由[0, 1]之间的浮点数组成的元组,分别代表红色、绿色、蓝色和透明度(0.1, 0.2, 0.5), (0.1, 0.2, 0.5, 0.3
不区分大小写的十六进制RGB或RGBA字符串。‘#0f0f0f’, ‘#0f0f0f80’
不区分大小写的RGB或RGBA字符串等效的十六进制缩写重复字符。‘#abc’ 等于 ‘#aabbcc’
对于灰度值,浮点值在闭合区间[0,1]中的字符串表示形式。‘0’ 表示黑色,‘1’表示白色,‘0.8’表示浅灰色
一些基本颜色的单字符简写符号。‘b’表示蓝色
不区分大小写的X11/CSS4颜色名称,不包含空格。‘aquamarine’
使用前缀’xkcd:'进行xkcd颜色调查,颜色名称不区分大小写。‘xkcd:sky blue’
来自T10分类调色板的不区分大小写的Tableau颜色。‘tab:blue’
CN"颜色规范,其中C排在一个数字前面,作为默认属性cycle的索引‘C0’
import matplotlib.pyplot as plt
import numpy as npt = np.linspace(0.0, 2.0, 201)
s = np.sin(2 * np.pi * t)# 1) RGB tuple:
fig, ax = plt.subplots(facecolor=(.18, .31, .31))
# 2) hex string:
ax.set_facecolor('#eafff5')
# 3) gray level string:
ax.set_title('Voltage vs. time chart', color='0.7')
# 4) single letter color string
ax.set_xlabel('Time [s]', color='c')
# 5) a named color:
ax.set_ylabel('Voltage [mV]', color='peachpuff')
# 6) a named xkcd color:
ax.plot(t, s, 'xkcd:crimson')
# 7) Cn notation:
ax.plot(t, .7*s, color='C4', linestyle='--')
# 8) tab notation:
ax.tick_params(labelcolor='tab:orange')plt.show()

通过辅助函数认识颜色

import mathfrom matplotlib.patches import Rectangle
import matplotlib.pyplot as plt
import matplotlib.colors as mcolorsdef plot_colortable(colors, *, ncols=4, sort_colors=True):cell_width = 212cell_height = 22swatch_width = 48margin = 12# Sort colors by hue, saturation, value and name.if sort_colors is True:names = sorted(colors, key=lambda c: tuple(mcolors.rgb_to_hsv(mcolors.to_rgb(c))))else:names = list(colors)n = len(names)nrows = math.ceil(n / ncols)width = cell_width * 4 + 2 * marginheight = cell_height * nrows + 2 * margindpi = 72fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi)fig.subplots_adjust(margin/width, margin/height,(width-margin)/width, (height-margin)/height)ax.set_xlim(0, cell_width * 4)ax.set_ylim(cell_height * (nrows-0.5), -cell_height/2.)ax.yaxis.set_visible(False)ax.xaxis.set_visible(False)ax.set_axis_off()for i, name in enumerate(names):row = i % nrowscol = i // nrowsy = row * cell_heightswatch_start_x = cell_width * coltext_pos_x = cell_width * col + swatch_width + 7ax.text(text_pos_x, y, name, fontsize=14,horizontalalignment='left',verticalalignment='center')ax.add_patch(Rectangle(xy=(swatch_start_x, y-9), width=swatch_width,height=18, facecolor=colors[name], edgecolor='0.7'))return fig
  • 基本色
plot_colortable(mcolors.BASE_COLORS, ncols=3, sort_colors=False)

在这里插入图片描述

  • 表盘色
plot_colortable(mcolors.TABLEAU_COLORS, ncols=2, sort_colors=False)

在这里插入图片描述

  • CSS颜色
plot_colortable(mcolors.CSS4_COLORS)
plt.show()

在这里插入图片描述

  • XKCD颜色
xkcd_fig = plot_colortable(mcolors.XKCD_COLORS)
xkcd_fig.savefig("XKCD_Colors.png")

在这里插入图片描述

matplotlib.colors API 点击进入

http://www.hkea.cn/news/607143/

相关文章:

  • 网站运行速度慢的原因看b站二十四小时直播间
  • 电商网站开发服务全网营销骗局揭秘
  • 个人网站怎么做互联网营销师培训课程免费
  • 微信网站建设价格网站开发报价方案
  • wordpress utc时间慢8小时大连seo关键词排名
  • 中国建设承包商网站创建软件平台该怎么做
  • 中小企业网站建设费用海外推广服务
  • 企业名称的英文做网站名seo是怎么优化推广的
  • 手机在线建站西安seo服务公司
  • 网站开发有前途吗我也要投放广告
  • 备案 网站名称怎么写crm软件
  • 扁平式网站模板b2b网站推广优化
  • 做外贸网站网络营销咨询服务
  • 江门网站建设方案报价淘宝seo优化怎么做
  • 盘龙城做网站推广网站推广
  • 如何做电子书网站域名站长工具
  • 物联网平台有哪些排名优化外包公司
  • 秦皇岛汽车网站制作数字营销工具
  • 培训教育的网站怎么做东莞做网站的联系电话
  • 云南做网站的公司外贸谷歌优化
  • 网页设计学徒培训可试学巢湖seo推广
  • 让顾客心动的句子seo模拟点击软件源码
  • 设计类专业包括哪些kj6699的seo综合查询
  • 手机网站制作哪家好查关键词
  • 米拓企业网站管理系统电商培训机构排名前十
  • 做效果图有哪些网站seo点击排名
  • 网络营销推广网站收录seo推广排名平台有哪些
  • 产品经理如何看待网站开发广州软件系统开发seo推广
  • wordpress 忘记管理员如何做网站seo
  • app和网站哪个有优势淘宝关键词排名