R

Asked • 10/17/19

How do I change the formatting of numbers on an axis with ggplot?

I'm using R and ggplot to draw a scatterplot of some data, all is fine except that the numbers on the y-axis are coming out with computer style exponent formatting, i.e. 4e+05, 5e+05, etc. This is obviously unacceptable, so I want to get it to display them as 500,000, 400,000, and so on. Getting a proper exponent notation would also be acceptable.The code for the plot is as follows: p <- ggplot(valids, aes(x=Test, y=Values)) + geom_point(position="jitter") + facet_grid(. ~ Facet) + scale_y_continuous(name="Fluorescent intensity/arbitrary units") + scale_x_discrete(name="Test repeat") + stat_summary(fun.ymin=median, fun.ymax=median, fun.y=median, geom="crossbar")Any help much appreciated.

1 Expert Answer

By:

Robert S. answered • 11/22/19

Tutor
5.0 (186)

R Developer and Analyst

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.