mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Refactor examples
This commit is contained in:
20
examples/reporting/plotly_reporting.py
Normal file
20
examples/reporting/plotly_reporting.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# TRAINS - Example of Plotly integration and reporting
|
||||
#
|
||||
from trains import Task
|
||||
import plotly.express as px
|
||||
|
||||
|
||||
task = Task.init('examples', 'plotly reporting')
|
||||
|
||||
print('reporting plotly figures')
|
||||
|
||||
# Iris dataset
|
||||
df = px.data.iris()
|
||||
|
||||
# create complex plotly figure
|
||||
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", marginal_y="rug", marginal_x="histogram")
|
||||
|
||||
# report the plotly figure
|
||||
task.get_logger().report_plotly(title="iris", series="sepal", iteration=0, figure=fig)
|
||||
|
||||
print('done')
|
||||
Reference in New Issue
Block a user