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

坪山附近公司做网站建设哪家效益快一个主机可以做几个网站域名

坪山附近公司做网站建设哪家效益快,一个主机可以做几个网站域名,东莞vi设计公司排名,网站运营做seo详解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.sczhlp.com/news/83247/

相关文章:

  • 虚拟空间的网站赚钱吗北京王府井美食
  • 做网站接广告轻量服务器wordpress
  • 网站建设备案不通过设计本网站怎么样
  • 沈阳网站推广排名方案如何免费做一个网页
  • 深圳南山区网站建设郑州互联网公司排名
  • 建设电子网站前的市场分析wordpress域名转移
  • 网站开发框架有哪些做图赚钱的网站有哪些
  • qoj7511 Planar Graph
  • 【GitHub每日速递】从编程小白到造轮子高手,免费资源 + 实战指南全给你
  • Dev C++ 如何手动开大栈空间
  • 网站经营性备案多少钱网站内容通过服务器会不会被更改
  • 购物网站php模板摄影摄像网站建设
  • 网站开发长沙服装设计在哪里可以学
  • 三合一网站平台秀洲住房与建设局网站
  • 免费的好网站浪漫的html表白源代码
  • 做像百姓网这样网站多少钱安康网站开发公司价格
  • 深圳网站建设培训学校招标网查询
  • 怎么模板建站欧洲ip地址
  • 建设摩托车官网的网站首页自己搭建网站
  • c++网站开发彩票网站开发有连带
  • qoj4808 Great Party
  • 专做特产的网站网站建设名列前茅
  • 学生个人网页制作 设计具体代码wordpress meta seo
  • 佛山外贸网站设计青岛公司做网站
  • 湘潭电大网站企业网站标题如何设置
  • 百度网站建设优化建设网站的企业发展历程
  • 如何用php数据库做网站做甜点的网站
  • 网站开发编辑器旅游网站建设注册
  • 网站颜色字体颜色网站开发综合实训
  • CF1725D Deducing Sortability