PyColormap4Matlab
PyColormap4Matlab
简单的Matlab和python脚本,从matplotlib colormaps导入Matlab。
getPyPlot_cMap返回任何colormap matplotlib python库的实现。它调用一个python脚本,写colormap矩阵到一个临时文件,即python(和matplotlib模块)要求。然而,优点是得到所有colormaps实现matplotlib,您可以指定数量的RGB量化水平,即colormap的颜色的数量。
colormap名称的列表中提供的功能帮助部分。getPyPlot_cMap (getname !)
返回一个包含所有可用cellstring colormap名字。看到https://matplotlib.org/examples/color/colormaps_reference.htmlcolormaps的插图。
使用
cMapNames = getPyPlot_cMap (getname !)
返回一个包含所有可用cellstring colormap名字。
提出= getPyPlot_cMap (cMapName)
返回colormapcMapName使用默认的128颜色。提出128将x3矩阵。
提出= getPyPlot_cMap (cMapName NumberOfColors)
指定颜色的数量,即在提出的行数。
提出= getPyPlot_cMap (cMapName NumberOfColors keepAlphaChannel)
如果keepAlphaChannel不是0提出第四列包含alpha通道。
提出= getPyPlot_cMap (cMapName NumberOfColors、keepAlphaChannel pythonSystemCommand)
允许您指定python命令(其中可能包括一个路径,见下文)用于执行python脚本。
错误
如果你已经安装了python但Matlab说有一个错误执行的命令……系统返回:……
你可以试着通过您的python安装路径明确作为第四参数,例如:
cmp = getPyPlot_cMap(“口音”,[][],”“c: \ Program Files \ Python37 \ python.exe””);
注意路径周围的双引号,这是必要的,因为其中包含空格字符。
引用作为
康拉德(2023)。PyColormap4MatlabGitHub (https://github.com/f-k-s/PyColormap4Matlab/releases/tag/v1.4.1)。检索。
MATLAB版本兼容性
平台的兼容性
窗户 macOS Linux标签
版本使用GitHub缺省分支不能下载
版本 | 发表 | 发布说明 | |
---|---|---|---|
1.4.1 | GitHub上看到这个版本发布说明:https://github.com/f-k-s/PyColormap4Matlab/releases/tag/v1.4.1 |
||
1.4 | 改善system-cmd错误处理 |
|
|
1.3.2 | colormap名称列表帮助部分m文件更新 |
|
|
1.3.1 | 生活添加脚本 |
|
|
1.3.0 | 固定的问题当python脚本路径包含空格或特殊字符。 更新描述。 |
|
|
1.2.0 | colormap名称列表(检索时! getname)现在由python脚本,而不是硬编码在Matlab生成的脚本。 |
|
|
1.1.0 | getname实现 |
|
|
1.0.2中 | 描述更新 |
|
|
1.0.1 | 图像添加(来自matplotlib.org) |
|
|
1.0.0 |
|