随笔分类 -  可视化

可视化利器 —— t-SNE(matlab toolbox 的使用与解释)
摘要:t-SNE – Laurens van der Maaten(感谢学术男神们的无私开源)User_guide.pdf(用户指南)1. tsne 函数mappedX = tsne(X, labels, no_dims, init_dims, perplexity)tsn... 阅读全文
posted @ 2016-11-25 23:01 未雨愁眸 阅读(2008) 评论(0) 推荐(0)
matlab 三维图像的绘制
摘要:1. 基本绘图函数plot3()scatter3()2. 修饰与点缀但仅使用默认的配置,调用这些绘图函数,不会很丑,但也漂亮不到哪里去。view(az, el),调整视野和视角; 阅读全文
posted @ 2016-11-24 23:44 未雨愁眸 阅读(217) 评论(0) 推荐(0)
matlab figure 调整大小、字体、线宽
摘要:用 matlab 画了一张图,投稿时要缩小,缩小后字体就会过小或者发虚。 解决办法:% figure resizeset(gcf,'Position',[100 100 260 220]);set(gca,'Position',[.13 .17 .80 .74]); ... 阅读全文
posted @ 2016-11-18 23:59 未雨愁眸 阅读(5155) 评论(0) 推荐(0)
matlab 工具函数 —— axnote(在坐标轴上写文本内容)
摘要:function axnote(string)font_size = get(0, 'DefaultAxesFontSize');if 1 h1 = text(0.99, 0.05, string, ... 'units', 'normal... 阅读全文
posted @ 2016-11-18 16:35 未雨愁眸 阅读(186) 评论(0) 推荐(0)
Matlab Tricks(二十三)—— 保存图像到 pdf
摘要:printme = @(txt) print('-dpdf', sprintf('figures/Example_%s',txt)); % 该匿名函数的接受的参数为字符串类型,也即欲保存的文件名; % print 没有创建文... 阅读全文
posted @ 2016-11-18 11:29 未雨愁眸 阅读(137) 评论(0) 推荐(0)
Python 绘图利器 —— ggplot
摘要:安装:命令行:pip install ggplot1. 杂项NameError: name ‘ggsave’ is not defined. Python ggplot- ggsave function not defined 解决方法,直接使用 ggplot() (... 阅读全文
posted @ 2016-11-17 22:04 未雨愁眸 阅读(876) 评论(0) 推荐(0)
什么图用什么工具画?
摘要:a-dramatic-tour-through-pythons-data-visualization-landscape-including-ggplot-and-altair0. 图像类型line chart:折线图, 一副折线图,可以自由一条折线,也可以 with... 阅读全文
posted @ 2016-11-17 19:34 未雨愁眸 阅读(181) 评论(0) 推荐(0)
matplotlib —— 添加文本信息(text)
摘要:matplotlib.pyplot.text(x, y, s, fontdict=None, withdash=False, **kwargs)x, y:表示坐标;s:字符串文本;fontdict:字典,可选;kw: fontsize=12,horizontalali... 阅读全文
posted @ 2016-10-26 14:56 未雨愁眸 阅读(5297) 评论(0) 推荐(0)
matplotlib:path effects
摘要:import matplotlib.pyplot as plt, matplotlib.patheffects as path_effects1. normalfig = plt.figure(figsize=(5, 1.5))text = fig.text(.5, ... 阅读全文
posted @ 2016-10-26 13:27 未雨愁眸 阅读(585) 评论(0) 推荐(0)
各种图示的介绍及绘制(boxplot、stem)
摘要:1. 箱线图(boxplot)也叫作箱形图;一种用作显示一组数据分散情况资料的统计图。因形状如箱子而得名。在各种领域也经常被使用,常见于品质管理。主要包含六个数据节点,将一组数据从大到小排列,分别计算出它的:上边缘,上四分位数Q3,中位数,下四分位数Q1,下边缘,还有... 阅读全文
posted @ 2016-10-26 12:43 未雨愁眸 阅读(883) 评论(0) 推荐(0)
matplotlib tricks(关闭坐标刻度、坐标轴不可见)
摘要:plt.gray():只有黑白两色,没有中间的渐进色1. 关闭坐标刻度(plt 与 AxesSubplot)pltplt.xticks([])plt.yticks([])关闭坐标轴:plt.axis('off')注意,类似的这些操作若想起作用,需要将其置于 plt.s... 阅读全文
posted @ 2016-10-26 10:26 未雨愁眸 阅读(2009) 评论(0) 推荐(0)
Python 动图、动画制作 —— moviepy、matplotlib.animation
摘要:进入命令行界面(windows ⇒ cmd),下载安装,pip install moviepy0. figure 的成员函数# 创建 figurefig, ax = plt.subplots()fig = plt.figure(figsize(6, 8))# 成员... 阅读全文
posted @ 2016-10-26 00:06 未雨愁眸 阅读(2296) 评论(0) 推荐(0)
Matlab Tricks(十四) —— 句柄(handle)(图形对象属性的读取与修改)
摘要:0. 句柄的获得H = subplot(1,2,1);saveas(H, [pathname,filename], 'jpg');1. h = plot(…)a = 0:10:360;x = a*pi/180;h = plot(x, sin(x), x, cos(x)... 阅读全文
posted @ 2016-10-23 00:14 未雨愁眸 阅读(256) 评论(0) 推荐(0)
经典图形的绘制(matlab)
摘要:1. radial sinusoïdal signal:径向正弦信号 [xx, yy] = meshgrid(-50:50);I = sin(sqrt(xx.^2+yy.^2));imshow(I, []) 阅读全文
posted @ 2016-10-05 12:58 未雨愁眸 阅读(147) 评论(0) 推荐(0)
dot 语法全介绍
摘要:0. 保存保存为 pdf:dot -Tpdf iris.dot -o iris.pdf1. 基本(1)无向图、有向图、子图graph G {} // 无向图digraph G {} // 有向图digraph G { subgraph cluster_0 {... 阅读全文
posted @ 2016-09-02 23:03 未雨愁眸 阅读(796) 评论(0) 推荐(0)
matplotlib 可视化 —— 定制 matplotlib
摘要:1. matplotlibrc 文件matplotlib使用matplotlibrc [matplotlib resource configurations] 配置文件来自定义各种属性,我们称之为 rc 配置或者 rc 参数。在 matplotlib 中你可以控制几乎... 阅读全文
posted @ 2016-08-26 11:51 未雨愁眸 阅读(190) 评论(0) 推荐(0)
matplotlib 可视化 —— 移动坐标轴(中心位置)
摘要:通常软件绘图,包括 matlab、python 的 matplotlib,默认都是将坐标轴置于画布(figure)的最下侧(x 轴),最左侧(y 轴),也即将坐标原点置于左下角。而我们自己理解数学,以及手动绘图时,都会将坐标轴置于中心的位置。1. 导入相关的包im... 阅读全文
posted @ 2016-08-26 09:27 未雨愁眸 阅读(3214) 评论(0) 推荐(0)
matplotlib 可视化 —— 定制画布风格 Customizing plots with style sheets(plt.style)
摘要:Customizing plots with style sheets — Matplotlib 1.5.1 documentation1. 使用和显示其他画布风格>> import matplotlib.pyplot as plt>> plt.style.use('... 阅读全文
posted @ 2016-08-26 08:33 未雨愁眸 阅读(270) 评论(0) 推荐(0)
matplotlib 可视化 —— 绘制常见图形
摘要:0. 饼状图plt.pie():Python数据可视化:饼状图 1. 三角形描点连线,起点和终点相同triangle1 = ((0, sqrt(3)/2), (1, 3*sqrt(3)/2), (2, sqrt(3)/2), (0, sqrt(3)/2))triang... 阅读全文
posted @ 2016-08-25 16:01 未雨愁眸 阅读(196) 评论(0) 推荐(0)
matplotlib 可视化 —— matplotlib.patches
摘要:官方帮助文档 patches — Matplotlib 1.5.1 documentationpatches 下主要包含的常用图形类有:EclipseCircleWedge1. plt.gca().add_patch(**)注意,创建的图形对象不会直接在 figure... 阅读全文
posted @ 2016-08-25 15:45 未雨愁眸 阅读(192) 评论(0) 推荐(0)