You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not great at understanding where/how to properly ask of this, but...
How are you getting your json code together for passing through to (clog-plotly:new-plot-plotly ...?). I have tried writing python to build a graph, then outputting json and adding to the function above like (using run-python in emacs):
import plotly.express as px
import plotly as pl
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig.show
This results in an empty clog-plotly "panel"?, so it isn't working. Is there a better way to go about this? I realize I am not up to speed on how plotly works, so my question is more along the lines of how one would go from having common lisp list data, to a plotly chart. Again, this is more of a workflow question about staying in common lisp land more than having to jump into python to get json made. Maybe I need to create a library for taking lisp data and, through something like cl-jonathan output json I can then push right into the two parameters for (clog-plotly:new-plot-plotly ...?). Maybe even integrate lisp-stat and dataframes? Looking for thoughts/idea's. Love the project btw.
PS - Is there an IRC channel for the project? Discord? etc?
The text was updated successfully, but these errors were encountered:
I am not great at understanding where/how to properly ask of this, but...
How are you getting your json code together for passing through to (clog-plotly:new-plot-plotly ...?). I have tried writing python to build a graph, then outputting json and adding to the function above like (using run-python in emacs):
=>
'data': [{'alignmentgroup': 'True',
'hovertemplate': 'x=%{x}
y=%{y}',
'legendgroup': '',
'marker': {'color': '#636efa', 'pattern': {'shape': ''}},
'name': '',
'offsetgroup': '',
'orientation': 'v',
'showlegend': False,
'textposition': 'auto',
'type': 'bar',
'x': array(['a', 'b', 'c'], dtype=object),
'xaxis': 'x',
'y': array([1, 3, 2]),
'yaxis': 'y'}],
'layout': {'barmode': 'relative',
'legend': {'tracegroupgap': 0},
'margin': {'t': 60},
'template': '...',
'xaxis': {'anchor': 'y', 'domain': [0.0, 1.0], 'title': {'text': 'x'}},
'yaxis': {'anchor': 'x', 'domain': [0.0, 1.0], 'title': {'text': 'y'}}}
})>
I push this into CL as:
(clog-plotly:new-plot-plotly target
"[{'alignmentgroup': 'True',
'hovertemplate': 'x=%{x}
y=%{y}',
'legendgroup': '',
'marker': {'color': '#636efa', 'pattern': {'shape': ''}},
'name': '',
'offsetgroup': '',
'orientation': 'v',
'showlegend': False,
'textposition': 'auto',
'type': 'bar',
'x': array(['a', 'b', 'c'], dtype=object),
'xaxis': 'x',
'y': array([1, 3, 2]),
'yaxis': 'y'}]"
"{'barmode': 'relative',
'legend': {'tracegroupgap': 0},
'margin': {'t': 60},
'template': '...',
'xaxis': {'anchor': 'y', 'domain': [0.0, 1.0], 'title': {'text': 'x'}},
'yaxis': {'anchor': 'x', 'domain': [0.0, 1.0], 'title': {'text': 'y'}}}")
This results in an empty clog-plotly "panel"?, so it isn't working. Is there a better way to go about this? I realize I am not up to speed on how plotly works, so my question is more along the lines of how one would go from having common lisp list data, to a plotly chart. Again, this is more of a workflow question about staying in common lisp land more than having to jump into python to get json made. Maybe I need to create a library for taking lisp data and, through something like cl-jonathan output json I can then push right into the two parameters for (clog-plotly:new-plot-plotly ...?). Maybe even integrate lisp-stat and dataframes? Looking for thoughts/idea's. Love the project btw.
PS - Is there an IRC channel for the project? Discord? etc?
The text was updated successfully, but these errors were encountered: