The jun_plotly module provides methods to use plotly integrated into erlang code, similar to use plot un jun_pandas.
Example of plotly from erlang:
{ok, Pid} = jun_worker:start_link(),
{ok, {_, DataFrame}} = jun_pandas:read_csv(Pid, <<"/files/csv.txt">>, []),
{ok, _} = jun_plotly:iplot(Pid, DataFrame, <<"line/iplot">>, [{<<"kind">>, <<"line">>}, {<<"x">>, <<"name">>}, {<<"y">>, <<"age">>}]).
jun_worker() = pid()
jun_dataframe() = {<<"pandas.core.frame.DataFrame">>, dataframe()}
dataframe() = {'$erlport.opaque', python, binary()}
keywords() = [{key :: binary(), value :: any()}, ...]
plotly() = {<<"plotly.iplot">>, binary()}
| iplot/4 | creates a new plot into plotly using a dataframe. |
| plot/4 | creates a new plot into a valid plotly url. |
| extend/4 | extends two plots into one (like merge them). |
| get_figure/4 | gets the figure (data representation) from a valid plotly url. |
iplot(jun_worker(), dataframe(), filename :: binary(), keywords()) -> {error, no_opaque_dataframe} | {ok, plotly()}
creates a new plot into plotly using a dataframe.
plot(jun_worker(), iplot :: binary(), filename :: binary(), keywords()) -> {ok, url :: string()}
creates a new plot into a valid plotly url.
extend(jun_worker(), iplotx :: binary(), iploty :: binary(), keywords()) -> {ok, plotly()}
extends two plots into one (like merge them).
get_figure(jun_worker(), url :: binary(), filename :: binary(), keywords()) -> {ok, plotly()}
get the figure (data representation) from a valid plotly url.