相关疑难解决方法(0)

如何用R创建时间螺旋图

有没有办法在R中绘制这样的图形并且在它上面有相同的12个轴?

这是图表的图片. 照片为图表

这是我的一个数据

        Date1  Time TravelTime
1  2016-09-04 13:11         34
2  2016-09-04 13:12         34
3  2016-09-04 13:13         33
4  2016-09-04 13:14         33
5  2016-09-04 13:15         33
6  2016-09-04 13:16         43
7  2016-09-04 13:17         44
8  2016-09-04 13:18         44
9  2016-09-04 13:19         40
10 2016-09-04 13:20         39
Run Code Online (Sandbox Code Playgroud)

这是dput的输出

structure(list(Date1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L), .Label = "2016-09-04", class = "factor"), Time = structure(1:10, .Label = c("13:11", 
"13:12", "13:13", "13:14", "13:15", "13:16", "13:17", "13:18", 
"13:19", "13:20"), …
Run Code Online (Sandbox Code Playgroud)

datetime r ggplot2 lattice

12
推荐指数
1
解决办法
1677
查看次数

在matplotlib线周围绘制边框

有没有一种正确的方法来绘制边框来勾勒出matplotlib图?

到目前为止我发现的最好的是这个答案[ 1 ]和一个matplotlib教程[ 2 ],它matplotlib.patheffects用于为轮廓绘制稍微粗的笔划.

我的问题是,它打破了半透明的情节,如果你设置alpha < 1.0你会看到主要背后的完整笔划,而我想要一个真正的边框.有没有办法画出真正的轮廓?

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patheffects as mpe

outline=mpe.withStroke(linewidth=8, foreground='black')

x = np.linspace(0, 2*np.pi, 1000)

plt.plot(x, np.sin(x), lw=5, color='red', path_effects=[outline],
         label="stroke no alpha")

plt.plot(x, np.sin(x-np.pi/3.), lw=5, alpha=0.5, color='red', path_effects=[outline],
         label="stroke with alpha")

plt.plot(x, np.sin(x-2*np.pi/3.), lw=5, alpha=0.5, color='red',
         label="no stroke with alpha")

plt.legend()
plt.show()
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

python transparency border matplotlib line

7
推荐指数
1
解决办法
716
查看次数

标签 统计

border ×1

datetime ×1

ggplot2 ×1

lattice ×1

line ×1

matplotlib ×1

python ×1

r ×1

transparency ×1