我想绘制带有标准错误的错误条形图,例如上载的excel文件。我该怎么办?
我使用ggplot2尝试绘制部分数据。
File "/home/ian/dev/obd/django_site/server/apps.py", line 2, in <module>
from . import populate_db
File "/home/ian/dev/obd/django_site/server/populate_db.py", line 16, in <module>
import server.models as models
File "/home/ian/dev/obd/django_site/server/models.py", line 6, in <module>
class Scan(models.Model):
File "/home/ian/.local/lib/python3.6/site-packages/django/db/models/base.py", line 87, in __new__
app_config = apps.get_containing_app_config(module)
File "/home/ian/.local/lib/python3.6/site-packages/django/apps/registry.py", line 249, in get_containing_app_config
self.check_apps_ready()
File "/home/ian/.local/lib/python3.6/site-packages/django/apps/registry.py", line 132, in check_apps_ready
raise AppfunctionRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
我想绘制带有错误栏的图表等Excel文件。
答案 0 :(得分:0)
您的问题(包括评论中的澄清)不清楚。这是我对上述示例图表的最佳猜测,尽管该图表似乎也没有显示误差线(至少不显示注释中定义的误差线)。
df2 <- reshape2::melt(df,
measure.vars = c("ESBL_EC", "Carbapenem"),
value.name = "prevalence")
ggplot(df2, aes(x = site, y = prevalence, fill = variable)) +
geom_col(position = "dodge") +
facet_grid(~ sampletype, scales = "free_x", space = "free_x")