I'm working with a dataframe with several columns, and am trying to use each column as a different aspect of the plot.
Specifically, I want to use one column as my x-axis, another column as my y-axis, and another column as a grouping factor.
data("iris")
str(iris)
iris$species[75:150] = sunflower
So in this dataset for example, I would want to plot Petal.Length vs Petal.Width as a barplot, and group by species. Any advice on this (and perhaps a tutorial page where I could learn how to become familiar with plotting with ggplot) would be super helpful. Thanks!
I asked a previous question and tried using pivot_longer() to reshape my dataframe; however, it turns the column names as the group which is not what I want.