My code:
plot1 <- qplot(price, property_type, data = lings, colour = host_is_superhost)
+theme_classic()
The result is:
I cannot see the price. How do I change the range of the X-axis?
My code:
plot1 <- qplot(price, property_type, data = lings, colour = host_is_superhost)
+theme_classic()
The result is:
I cannot see the price. How do I change the range of the X-axis?
You should be able to add the additional element by adding + xlim()
to your plot:
plot1 <- qplot(price, property_type, data = listings, colour = host_is_superhost) +
theme_classic() + xlim(50, 100)
Where you would change the numbers 50 (lower limit) and 100 (upper limit) of xlim(50, 100)
to whatever you need.
I would also point out that the price
field on the x-axis has a problem with the labels, which makes me think the data is in the incorrect character or factor data type rather than a numeric type. If that is the case, before plotting your data you might want to include this line of code:
listings$price <- as.numeric(listings$price)