Description Usage Arguments See Also Examples
These functions set up gnuplot-like secondary axes. They also try to choose pretty breaks/ticks for continuous data. Your mileage with the breaks/ticks may vary, so be sure to try different settings.
1 2 3 | scale_x_gnuplot(breaks = gnubreaks(), sec.axis = gnuaxis(), ...)
scale_y_gnuplot(breaks = gnubreaks(), sec.axis = gnuaxis(), ...)
gnubreaks(n = 5, padding = 0.1)
|
breaks |
One of:
|
sec.axis |
|
... |
Other arguments passed on to |
n |
The number of breaks/ticks to return |
padding |
The amount of space between the outermost breaks/ticks and the axis limits relative to the axis range. A number between 0 and 0.5. |
The labeling package for alternative
break/tick functions, and ggplot2::dup_axis()
,
for which gnuaxis()
is an alias
1 2 3 4 5 6 7 8 | library(ggplot2)
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point() +
scale_color_gnuplot() +
scale_x_gnuplot() +
scale_y_gnuplot() +
theme_gnuplot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.