Skip to content

Specifying a plot title #1451

@region-spotteR

Description

@region-spotteR

There is inconsistency in the documentation how to customize the plot title. In [the R complete reference documentation] it tells you specify a title by using list object with elements called text,color etc.
However the documentation on the project website still uses title="some string".

I am using R 3.5.2. and plotly 4.8. from CRAN. The way from the R reference documentation does not work for me...

plot_ly()%>%
  layout(
    title = list(text = 'sample plot', color = 'rgb(217,83,79)')
    ) %>%
  add_trace(x=1:7,y=round(runif(7)*7),type="scatter",mode="lines+marker")

...the title="some string" works though:

plot_ly()%>%
  layout(
    title = 'sample plot'
    ) %>%
  add_trace(x=1:7,y=round(runif(7)*7),type="scatter",mode="lines+marker")

I discovered the issue through by answering a question on stackoverflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions