Date Below the chart

Asked

Viewed 26 times

0

Hello, I have the following codeinserir a descrição da imagem aqui

my doubt is, using the function Legend has how do I put the dates below the chart? if not, what would be the best way to do that?

  • 1

    The best option is axis(1, at = onde, labels = o_quê).

  • 2

    Mrlops, good morning! Do not use code image, there is a block where you can insert your formatted code within the question itself. Hug!

1 answer

1


See help for barplot, it has an argument to provide the bar names:

# Dados de exemplo
set.seed(757)
dados <- data.frame(date = paste(2020, 1:8, sep = "-"), cases = rpois(8, 4))

with(dados, barplot(cases, names.arg = date))

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.