gf_point()

gf_point()

The gf_point() function can be used to create a scatterplot, or to plot a specified point, such as a specific value along the x-axis.

Example 1:

gf_point( Thumb ~ Height , data = Fingers , size = 2 )


Example of output from running the code above:


Example 2:

# Save the sample b1 and set up the sampling distribution of b1s
sample_b1 <- b1(Tip ~ Condition, data = TipExperiment)
sdob1 <- do(1000)* b1(Tip ~ shuffle(Condition), data = TipExperiment)
# Plot the sample b1 value along the x-axis of the sdob1
gf_histogram(~b1, data = sdob1, fill = ~middle(b1, .95), bins=100) %>%
      gf_point(0 ~ sample_b1, color = "black")

Example of output from running the code above: