View source: R/council_layout.R
council_layout | R Documentation |
Council plotly formatting
council_layout(
a_plotly,
main_title = "",
subtitle = "",
x_title = "",
y_title = "",
legend_title = "",
...
)
plotly_layout(
a_plotly,
main_title = "",
subtitle = "",
x_title = "",
y_title = "",
legend_title = "",
...
)
a_plotly |
|
main_title |
character, plot title |
subtitle |
character, plot subtitle |
x_title |
character, x-axis title |
y_title |
character y-axis title |
legend_title |
character, legend title |
... |
additional parameters passed to |
plotly::plot_ly()
object with Council styling
Further examples in vignette("Color")
.
The subtitle
returned is an annotation, and so cannot be further modified.
If you want to modify the subtitle aesthetics, leave subtitle = ""
and
add a subtitle using plotly::layout(annotations = list(...))
.
Other aesthetics:
blue_cascade
,
colors
,
council.pal()
,
council_pal2()
,
map_council_continuous()
,
scale_color_council()
,
scale_fill_council()
,
theme_council()
## Not run:
library(plotly)
library(councilR)
plotly::plot_ly(
type = "scatter",
mode = "markers",
data = iris,
x = ~Sepal.Length,
y = ~Sepal.Width,
color = ~Species,
hoverinfo = "text",
hovertext = ~ paste0(
Species, "<br>",
"Sepal Length: ", Sepal.Length, "<br>",
"Sepal Width: ", Sepal.Width
),
marker = list(
size = 10,
opacity = 0.8
)
) %>%
plotly_layout(
main_title = "Iris",
subtitle = "Sepal characteristics",
x_title = "Sepal Length",
y_title = "Sepal Width",
legend_title = "Species",
legend = list(orientation = "h")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.