r - How do I anchor one side of axis limits? -


I have the data frame of positive x and y value which i used in the form of a scatter plane in ggplot2 . The values ​​have collapsed away from the point (0,0) but I want to include x = 0 and y = 0 lines in the plot to show the whole magnitude. How can I do this?

  set.seed (34 9) D & lt; - data.frame (x = runif (10, 1, 2), y = runif (10, 1, 2))) Ggplot (d, aes (x, y)) + geom_point ()   

no plot (0,0)

but whatever I want It is almost equal, to specify both ends of the boundary:

  ggplot (D, AES (x = x, y = y)) + geom_point () + scale_x_continuous (border = C (0,2)) + scale_y_continuous (range = C (0,2))   

 plot with (0,0)

one option only for X and Y minutes Anchor But most unspecified

  ggplot (d, aes (x, y)) + geom_point () + scale_x_continuous (range = C (0, NA)) + scale_y_continuous (range = c ( 0, NA))    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -