Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

joshday/PlotlyLocal.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlotlyLocal

Build Status

The main function defined in this package is plot(data, layout).

Plotly plots are fully specified by

  • data: Vector of Dicts, each represents a trace
  • layout: Dict

They keys inside of the dictionaries need to match the attributes from the Plotly documentation. Each JSON object is created by a Julia Dict, so nested objects are created by nested Dicts.

Example:

using PlotlyLocal, Colors

data = [
    Dict(:y => randn(100)),
    Dict(:y => rand(100), :marker => Dict(:color => hex(colorant"black")))
]

layout = Dict(:title => "My Title")

plot(data, layout)

To plot inline within Jupyter notebooks use the iplot method in place of plot.

The dictionary structure will look something like this when converted to JSON:

var data = [
  {
    y: [0.118431, 0.660444, ...]
  },
  {
    y: [0.87696, 0.385333, ...],
    marker: {
      color: "000000"
    }
  }
]

var layout = {
  title: "My Title"
}

Thanks

A big thank you to the folks at Plotly for going open source!

About

Interface for local Plotly visualizations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages