I'm very new to programming, so I'm sorry if this is a basic question that has been answered a bunch of times. I'm trying to plot a histogram that has months on the X-axis and number of sunspots on the Y-axis. To get the data I'm using stats library.
x <- datasets::sunspot.month
h <- hist(x, breaks=12, col="red", xlab="Month", main="Histogram with Normal Curve")
this is the code that i currently have and I'm getting some weird (probably wrong results), any advice on what I should try?
P.S. You can ignore the nominal curve I'll try to do that on my own once I get this right.