第一列不会显示百分比

时间:2017-04-24 22:40:04

标签: python debugging graph label axis

我在这段代码中有一个错误,但似乎无法找到它。第一列未显示百分比。应该快速解决!

mydf = data.frame(c("New York", "New York", "San Francisco"),
              c(4000, 7600, 2500),
              c("Bartosz", "Damian", "Maciej"))
colnames(mydf) = c("city","salary","name")

ny.df = subset(mydf, city == "New York", select = c(salary, name))
sum(ny.df$salary)
mean(ny.df$salary)
ny.df[which(ny.df$salary == min(ny.df$salary)),]

并且,如果您还可以在“您的计划”和基准列之间添加一行来分隔那些非常棒的列!非常感谢大家!

1 个答案:

答案 0 :(得分:0)

#!/bin/bash if [ "$SLACK" == "TRUE" ] then if ! [[ ${OUTPUT} =~ "*mysql: [Warning] Using a password on the command line interface can be insecure*" ]] then slack_it fi fi Adds data labels to top of bars元素而不是1st开头的循环中。将其更改为

0th

它将显示for p in ax.patches: 值的%标签。

要在0th0th栏之间添加一条垂直线,您可以在1st

上绘制axvline
x=0.5

有关该行的进一步样式,请参阅docs中的属性,即

  • line = plt.axvline(x=0.5)
  • line.linestyle='dashed'