我通过Homebrew安装了Octave和gnuplot,并下载了AquaTerm.dmg.当我尝试绘图时,我收到以下消息:
octave:4> plot(x,y)
gnuplot> set terminal aqua enhanced title "Figure 1" font "*,6"
^
`line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list`
Run Code Online (Sandbox Code Playgroud)
在bash终端set terminal,set Terminal,set term,(和相同的,其次是"AQUA"太)等给予什么.我已经尝试从八度音阶再次绘制"AquaTerm"已经打开,但没有.我已经尝试直接从gnuplot绘图,但同样的问题..我怎么能这样做"设置终端aqua"?
Gnuplot启动消息说" Terminal type set to 'x11'"但不知道如何更改它,以前的命令也不起作用.
由于AquaTerm没有从Homebrew安装,也许octave/gnupot找不到它......但不知道.有什么猜测?谢谢!
我正在使用ggplot进行散点图.我想有个与特定的颜色和填充(中plot,colour="blue", fill="cyan4"有前),但我怎么也找不到.我对此有何看法:
ggplot(df, aes(own,method)) +
panel.configuration +
scale_shape_identity() + #to use the 'plot' shape format.
geom_point(aes(color = factor(label)), position = "jitter",size=3) +
Run Code Online (Sandbox Code Playgroud)
(在之前geom_point我尝试过shape=21按照我的方式添加plot)
scale_colour_manual(values=c("A"="chocolate3","B"="cyan4")) +
scale_fill_manual(values=c("A"="green", "B"="red")) + #DOES NOTHING...
xlim(7,47) + ylim(7,47)+ ... etc.
Run Code Online (Sandbox Code Playgroud)
这就是我没有"shape = 21"的结果

这是我添加"shape = 21"时得到的结果.在这两种情况下它都会忽略scale_fill

我也尝试添加fill=c("blue","red")geom_point,但R抱怨:"错误:设置美学的不兼容长度:形状,大小,填充".
有关如何获得它的任何建议?什么是错scale_fill在我的代码?
非常感谢你!
数据(df)看起来像:
21 15 A
24 16 A
24 17 A
28 14 A
24 15 A
22 15 A
20 18 …Run Code Online (Sandbox Code Playgroud) 使用以下数据:
> str(attribute)
'data.frame': 431 obs. of 2 variables:
$ pos: int 1 2 3 4 5 6 7 8 9 10 ...
$ att: num 0.652 0.733 0.815 1.079 0.885 ... *[between 0 and 3]
Run Code Online (Sandbox Code Playgroud)
和:
ggplot(attribute, aes(x=pos, y=att)) + geom_line() + geom_smooth()
Run Code Online (Sandbox Code Playgroud)
我做了:

我想逐渐平滑黑色曲线,而不是"geom_smooth默认值".我试过n,level选择,但没有做我想要的.哪个是逐步增加平滑度的最佳方法?(例如,在一个中平均2个值,然后在一个中尝试3个,依此类推).我想这是非常容易或无法使用的东西geom_smooth,但我不知道搜索/寻找什么.谢谢.
我有一个x基因(30x2000)的2000个基因表达在不同的细胞系和y一个连续可变结果的向量(30x1).我想计算每个基因和结果之间的Pearson相关性,因此,我期望得到一个2000x1的r值向量.我已经使用rcorr(x,y)但是结果是一个2000x2000矩阵,所以我猜它忽略了y所有基因并计算所有基因(手册说:
x =具有至少5行且至少2列的数字矩阵(如果y不存在)
但是,我可以拥有多个专栏y吗?我必须使用不同的功能吗?
我想构建一个散点图,如下所示:http : //www.cbioportal.org/public-portal/images/previews/tp53_mutations.png,其中每个点都有一个圆+垂直线。
我在下面找到的最接近的东西是的3D散点图library(scatterplot3d),但我只有x,y。
您对库/函数/选项有任何建议吗?
此数据的范围为0.42到1:
> summary(performance$SPC8)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.4210 0.7805 0.8590 0.8359 0.9220 1.0000
Run Code Online (Sandbox Code Playgroud)
我做了以下直方图:
ggplot(performance, aes(x=SPC8)) +
geom_histogram(aes(y = 100*(..count.. /74)), binwidth=.1, colour="black", fill="cadetblue3") +
geom_vline(aes(xintercept=mean(SPC8, na.rm=T)),color="red", linetype="dashed", size=1) +
format_options
Run Code Online (Sandbox Code Playgroud)
如何更改上面的代码,以便"1"后没有bin?