有没有可以通过代码可视化算法的软件?作为类似的东西的流程图.不依赖,继承和那种东西,而是函数内部的代码,或者一系列函数.
我正在使用Python来处理填充了我想要运行计算的数据的CSV文件,然后绘制图形.我正在寻找一个可以使用的库,我可以将经过处理的CSV信息发送到某种类型的dict,然后选择不同的图形样式.
有没有人有任何建议?
我有一个密度图,我想添加一些摘要信息,例如在中位数放置一条线并遮蔽90%可信区间(第5和第95分位数).有没有办法在ggplot中这样做?
这是我想总结的情节类型:
我可以弄清楚如何从y = 0到y =密度(中位数(x))绘制一条线,但是我不清楚我是否可以使用90%CI对阴影进行着色.或者,我可以在密度图上方添加一个水平箱图,但不清楚如何自动旋转箱图,而不用随之旋转密度图.
x <- as.vector(rnorm(10000))
d <- as.data.frame(x=x)
library(ggplot2)
ggplot(data = d) + theme_bw() +
geom_density(aes(x=x, y = ..density..), color = 'black')
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用Ubigraph及其xml-rpc接口生成大型图形可视化.然而,Ubigraph的xmlRPC服务器不够快,无法处理我的python代码生成的调用率,并冻结.我已经尝试了网站上列出的所有性能提示无济于事.直接包装器在Ubigraph的免费版本中不可用,因此我的问题是:Ubigraph中是否有任何Free(如语音)替代品?
这个等式来自我之前的问题.我想绘制代表总人口的点,到目前为止,我习惯于scale_size使点的大小相对于总人口而言.
但是,我想让这些点透明,因为点覆盖了地图.但是,只要我尝试发送的消息清楚,我就可以使用其他选项.

# load required packages
library(ggmap)
library(ggplot2)
# query map of Birmingham, AL
al1 <- get_map(location = c(lon = -86.304474, lat = 32.362563), zoom = 11,
source = "osm", maptype = 'terrain')
al1MAP <- ggmap(al1)+ geom_point(data=quote_bmh,
aes(x=IntPtLon, y=IntPtLat, size=TotPop, colour="gold2"),
colour="gold2") + scale_size(range=c(0,15))
Run Code Online (Sandbox Code Playgroud) 
正如我的同事指出的那样,连接点是他们在小学教学的东西.
这是数据:
hour_timetable mean_delayed_pass
0 6.074
1 6.512
2 7.632
3 9.393
4 8.759
5 4.600
6 6.040
7 5.575
8 5.680
9 6.315
10 6.895
11 7.852
12 6.832
13 6.961
14 6.322
15 5.954
16 5.579
17 5.540
18 5.142
19 5.579
20 6.139
21 6.501
22 6.140
23 6.061
Run Code Online (Sandbox Code Playgroud)
这是代码:
library(ggplot2)
ggplot(data = test_vis, aes(x = factor(hour_timetable), y = mean_delayed_pass, group = 1)) +
ylim(0, NA) +
geom_point(color = 'purple', stat = 'identity') +
geom_line(color = 'purple') …Run Code Online (Sandbox Code Playgroud) 使用案例: 我使用riverplot包绘制sankey图表.我需要调整图中节点标签的文本大小.在我的情况下,默认大小太大了.
问题,我已经尝试过了:
不幸的是,包不适用于cex参数.该软件包的开发人员没有向我提供指导.r可
重现的例子:
library(riverplot)
plot(riverplot.example())
Run Code Online (Sandbox Code Playgroud)
产生:

题:
如何将节点标签(A,B,...)调整为比默认值更小或更大的尺寸?
是否可以在Google Colaboratory中使用Jupyter Widgets?
但是我收到了这条错误消息.
无法显示Map类型的Jupyter Widget.
如果您在Jupyter Notebook或JupyterLab Notebook中阅读此消息,则可能意味着小部件JavaScript仍在加载.如果此消息仍然存在,则可能意味着未安装或未启用窗口小部件JavaScript库.有关安装说明,请参阅Jupyter Widgets文档.
如果您正在另一个前端读取此消息(例如,GitHub或NBViewer上的静态呈现),则可能意味着您的前端当前不支持小部件.
是否可以使用这些小部件?或者我在某个地方犯了错误?
Ancestry <- data.frame(Race = c("European", "African American", "Asian", "Hispanic", "Other"), Proportion = c(40, 30, 10, 15, 5))
Ancestry %>%
ggplot(aes(y = Proportion, fill = Race)) +
geom_bar(stat="identity", colour="white")
Run Code Online (Sandbox Code Playgroud)
运行上面的代码给我以下错误:
Warning in min(x, na.rm = na.rm) :
no non-missing arguments to min; returning Inf
Warning in max(x, na.rm = na.rm) :
no non-missing arguments to max; returning -Inf
Warning in min(diff(sort(x))) :
no non-missing arguments to min; returning Inf
Warning in x - width/2 :
longer object length is not a …Run Code Online (Sandbox Code Playgroud) 绘制网络时,如果节点的标签也可以避开网络边缘,那将是很好的选择。例如,在下面的示例中,可以将所有标签移到网络外部。我已经尝试了几个软件包,但是到目前为止,还没有找到一种可行的方法。有办法吗?下面的例子:
library(ggraph)
library(tidygraph)
reprex <- tibble(to = sample(1:10, 100,replace=T),
from = sample(1:10, 100,replace=T)
) %>%
as_tbl_graph()
V(reprex)$label1 <- rep("label",10)
reprex_plot <- reprex %>%
ggraph() +
geom_node_point() +
geom_edge_link(color="grey")+
geom_node_text(aes(label=label1),repel=T,force=100)+
theme_bw()
reprex_plot
Run Code Online (Sandbox Code Playgroud)
visualization ×10
r ×6
ggplot2 ×4
graph ×2
python ×2
bar-chart ×1
c# ×1
ggmap ×1
ggraph ×1
ggrepel ×1
google-maps ×1
riverplot ×1
statistics ×1
widget ×1