i should draw two graphs the one graph contains all cars with am = 1 and the second graph am = 0

these graphes should be like a panel

par(mfrow = c(1,2))

plot(df.cars$mpg,df.cars$hp)

plot(df.cars$mpg,df.cars$hp)

i should draw two graphs the one graph contains all cars with am = 1 and the second graph am = 0

these graphes should be like a panel

par(mfrow = c(1,2))

plot(df.cars$mpg,df.cars$hp)

plot(df.cars$mpg,df.cars$hp)

See the FAQ: How to do a minimal reproducible example `reprex`

for beginners because your `df.cars`

is not visible.

```
par(mfrow = c(1,2))
a <- which(mtcars["am"] == 0)
b <- which(mtcars["am"] == 1)
plot(mtcars[a,]$mpg,mtcars[a,]$hp)
plot(mtcars[b,]$mpg,mtcars[b,]$hp)
```