Tag: 子图

我怎样才能在matplotlib中创build一个空白的子图?

我正在matplotlib中制作一组子图(比如说3 x 2),但是我有less于6个数据集。 我怎样才能使剩余的子空间为空? 这个安排看起来像这样: +—-+—-+ | 0,0| 0,1| +—-+—-+ | 1,0| 1,1| +—-+—-+ | 2,0| 2,1| +—-+—-+ 这可能会持续多个页面,但在最后一页,例如,2,1框中的5个数据集将是空的。 不过,我已经宣布这个数字为: cfig,ax = plt.subplots(3,2) 所以在子图2,1的空间中有一个默认的带有刻度和标签的坐标轴。 我怎样才能以编程的方式渲染这个空间,并没有轴?

用于子图的pyplot轴标签

我有以下情节: import matplotlib.pyplot as plt fig2 = plt.figure() ax3 = fig2.add_subplot(2,1,1) ax4 = fig2.add_subplot(2,1,2) ax4.loglog(x1, y1) ax3.loglog(x2, y2) ax3.set_ylabel('hello') 我希望能够创build轴标签和标题不仅为每个两个子图,但也常见的标签跨越两个子图。 例如,由于两个图都具有相同的坐标轴,所以我只需要一组x轴和y轴标签。 尽pipe如此,我还是希望为每个子区域创build不同的标题。 我尝试了一些东西,但没有一个能正确运行

GraphViz – 如何连接子图?

在GraphViz的DOT语言中,我试图表示一个依赖关系图。 我需要能够有一个容器内的节点,并能够使节点和/或容器依赖于其他节点和/或容器。 我使用subgraph来表示我的容器。 节点链接工作得很好,但我不知道如何连接子图。 鉴于下面的程序,我需要能够用箭头连接cluster_1和cluster_2 ,但是我尝试过的任何事情都会创build新的节点,而不是连接集群: digraph G { graph [fontsize=10 fontname="Verdana"]; node [shape=record fontsize=10 fontname="Verdana"]; subgraph cluster_0 { node [style=filled]; "Item 1" "Item 2"; label = "Container A"; color=blue; } subgraph cluster_1 { node [style=filled]; "Item 3" "Item 4"; label = "Container B"; color=blue; } subgraph cluster_2 { node [style=filled]; "Item 5" "Item 6"; […]