Can one set Configuration Options using PlotlyJS.jl?

This page describes configuration options, such as editable, displayModeBar, and displaylogo that I would like to try from Julia and PlotlyJS.jl. Is there a way to send those options? I’ve tried as keywords in the plot command and they are not recognized.

EDIT: based on @PetrKryslUCSD’s code example, this plot(plotdata,layout;options=Dict(:displaylogo=>false)) seems to work for me.

I struggled with it too. Here is something that I found to work:

1 Like

Does this still work with PlotlyJS 0.16? I get


julia> options = Dict(
                               , :showLink=>true, :displayLogo=>false)
Dict{Symbol, Any} with 4 entries:
  :showLink        => true
  :showSendToCloud => true
  :displayLogo     => false
  :plotlyServerURL => ""

julia> p=plot(rand(10, 4), layout, options=options)

So not as expected. Issue has been created at What happened to the options in 0.16? · Issue #390 · JuliaPlots/PlotlyJS.jl · GitHub.

Looks like there was a special data structure introduced for this purpose. This works with PlotlyJS 0.16:

julia> options = PlotConfig(plotlyServerURL="", showLink=true)

julia> p=plot(rand(10, 4), layout, config=options)
1 Like

Hi PetrKrysl

Does this link still work? I can not access this page or any other page where all plotly options are explained, for instance, how to set the date names from english to other languages.

Sorry: which link do you mean? In case it is the May 2020 one: The package mentioned above has been redesigned. Here are the plotting utilities: FinEtoolsFlexBeams.jl/VisUtilModule.jl at c0d2a9ca63dda8a51af886e5b21e429237d6e2a4 · PetrKryslUCSD/FinEtoolsFlexBeams.jl · GitHub


My question addressed the topic " Can one set Configuration Options using PlotlyJS.jl? "

The plotly homepage for Julia has a subpage explaining some configurations. The at the bottom of this page mentioned link does not exist

I hoped to find a section towards configs on

The reason for asking was the wish to change plotly axes ticklabels for dates from english to German.

Thanks for helping!

Country specifific datetime cannot be set via configuration, but using custom Dates.LOCALES["german"]
If you have a DataFrame with a column date in european(german) format, then you must proceed as follows:

using PlotlyJS, DataFrames, Dates
Dates.LOCALES["german"]= Dates.DateLocale(
      ["Januar", "Februar", "März", "April", "Mai","Juni",
      "Juli", "August", "September", "Oktober", "November", "Dezember"],
      ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep",
       "Okt", "Nov","Dez"],
      ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],  [""])

#your data frame with date given as a string "day-month-year":
df= DataFrame(date=["15-0$k-2021" for k in 1:9], A=rand(10:20, 9))
df[!, :date] = Date.(, "dd-mm-yyyy")  #convert strings to Date
#set Date in the format you want to be displayed in your plot:
newdate= [Dates.format(d, "dd U yyyy"; locale="german") for d in df[!, :date] ]
#or newdate=[Dates.format(d, "dd u yyyy"; locale="german") for d in df[!, :date] ]
fig = plot(
    scatter(x=newdate, y=df[!,:A], color=:symbol),
           title="German style date", xaxis_tickangle=-45


Thanks Empet, such stand alone examples are the best way to learn Julia :slight_smile: