plots of values with list on axes

I am learning how to use R 'cause I have to do the thesis for my degree.

I have a big problem: I am trying to make a plot of a data frame which has a list of word on x and the corresponding number on y.

The problem is that I can not plot "points" but small lines and I don't want this to happpen. I tryed to write "type="p"" or use "pch" but it still doesn't work.
Here I put an example:

Can someone help me please?

My advice is to move away from the base plotting and embrace ggplot2.

example_data <- data.frame(l=c(letters,LETTERS),
           y=runif(52,-2,8),stringsAsFactors = TRUE)


ggplot(example_data) + 
  aes(x=l,y=y) + 

learn more :

1 Like

Thanks! It seems it can work, I only need to rewrite some declarations for particulars.
thanks a lot

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.