Closed john-graves-les-mills closed 1 year ago
The transition graph interface currently has an export feature for svg and html. Try it, it works outside of the Jupyter environment. Export to png will be added in the next library update.
We'll add a method for exporting the step matrix to png into our backlog. It's likely that we'll implement it when we roll out the interactive step matrix.
Thank you for your feedback. Were my responses helpful?
any updates here?
- The transition graph interface currently has an export feature for svg and html. Try it, it works outside of the Jupyter environment. Export to png will be added in the next library update.
- We'll add a method for exporting the step matrix to png into our backlog. It's likely that we'll implement it when we roll out the interactive step matrix.
Thank you for your feedback. Were my responses helpful?
To support the use case of sharing plots OUTSIDE of Jupyter (such as in a PowerPoint deck), have been looking at tweaks to the Quick Start plot examples:
title = 'Sankey' fig = stream.step_sankey(max_steps=6, threshold=0.05, show_plot=False).plot() fig.update_layout(title=title) fig.write_image(f"{title}.png")
title = 'Clusters' from retentioneering.tooling.clusters import Clusters clusters = Clusters(stream) X = clusters.extract_features(feature_type='tfidf', ngram_range=(1, 2)) clusters.fit(method='kmeans', n_clusters=8, X=X) fig = clusters.plot(targets=['payment_done', 'cart']) fig.title.set_text(title) fig.get_figure().savefig(f"{title}.png", bbox_inches='tight')
title = 'Funnel' fig = stream.funnel(stages=['catalog', 'cart', 'payment_done'], show_plot=False).plot() fig.update_layout(title=title) fig.write_image(f"{title}.png")
title = 'Heatmap' fig = stream.cohorts( cohort_start_unit='M', cohort_period=(1, 'M'), average=False, show_plot=False ).heatmap() fig.title.set_text(title) fig.get_figure().savefig(f"{title}.png")
Any suggestions for similar programmatic (.png) outputs for Transition Graph and Step Matrix would be appreciated.