I can't get my plot to plot

I am new to R, and I am trying to get a plot to plot wind-speed on the x and temperature on the y. All I get from the plot is a single dot in the middle.

This is my code: What am I missing?

'''
library(dplyr)
library(readr)
library(tidyverse)
library(ggplot2)

weather <- read_csv("Code/R/data/jena_climate_2016.csv")
view(weather)

ggplot(data = weather) +
geom_point(mapping = aes(x = 'wv (m/s)', y = 'T (degC)'))

'''

I do not see anything obviously wrong with the code. Are you getting any error message?

Please post the output of

dput(head(weather))

Put three back ticks just before and just after the output, like this
```
Your output
```
The back tick is to the left of the 1 key on a US keyboard.

Are you using back ticks or apostrophes around your column names? It should be back ticks.

> dput(head(weather))
structure(list(`Date Time` = c("01.01.2016 00:00:00", "01.01.2016 00:10:00", 
"01.01.2016 00:20:00", "01.01.2016 00:30:00", "01.01.2016 00:40:00", 
"01.01.2016 00:50:00"), `p (mbar)` = c(999.08, 999.03, 999.07, 
999.09, 999.09, 999.08), `T (degC)` = c(-0.01, 0.01, 0.06, 0.07, 
-0.05, 0.07), `Tpot (K)` = c(273.22, 273.25, 273.29, 273.3, 273.18, 
273.3), `Tdew (degC)` = c(-0.44, -0.41, -0.36, -0.36, -0.5, -0.33
), `rh (%)` = c(96.9, 97, 97, 96.9, 96.8, 97.1), `VPmax (mbar)` = c(6.1, 
6.11, 6.13, 6.14, 6.09, 6.14), `VPact (mbar)` = c(5.91, 5.93, 
5.95, 5.95, 5.89, 5.96), `VPdef (mbar)` = c(0.19, 0.18, 0.18, 
0.19, 0.19, 0.18), `sh (g/kg)` = c(3.69, 3.7, 3.71, 3.71, 3.68, 
3.72), `H2OC (mmol/mol)` = c(5.92, 5.94, 5.96, 5.96, 5.9, 5.97
), `rho (g/m**3)` = c(1271.32, 1271.16, 1270.97, 1270.93, 1271.54, 
1270.93), `wv (m/s)` = c(1.16, 1.01, 0.8, 0.77, 0.84, 0.33), 
    `max. wv (m/s)` = c(2.04, 2.12, 1.52, 1.64, 1.92, 0.84), 
    `wd (deg)` = c(192.4, 211.6, 203.8, 184.2, 200.1, 159.8)), row.names = c(NA, 
-6L), class = c("tbl_df", "tbl", "data.frame"))

It was the back ticks around column names. Thank you!!!

This topic was automatically closed 7 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.