ggplot将图例中的符号覆盖为仅行

时间:2018-06-26 19:38:35

标签: r ggplot2

我只想在图例中显示线条(而不是十字架)。 picture of plot with cross

<h1>{{ course.title }}</h1>

{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

<ul>
{# reverse lookup on codes with course foreignkey relationship #}
{% for code in course.code_set.all %}
  <li>{{ code.code }}</li>
{% endfor %}
</ul>

{% include "core/enroll.html" %}

1 个答案:

答案 0 :(得分:0)

show.legend = FALSE添加到您不希望使用图例的geom中,例如:

geom_linerange(aes(ymin = -(plogis(lower)-0.5), ymax = - (plogis(upper)-0.5)), 
               position = position_dodge(0.02), 
               size = 1, 
               show.legend = FALSE)