Skip to content

Commit 6dc37b3

Browse files
authored
Merge pull request #20 from Elphick/16-split-along-a-dimension-with-function
16 split along a dimension with function
2 parents be27b90 + 5403151 commit 6dc37b3

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

elphick/mass_composition/mc_network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def plot_network(self) -> go.Figure:
149149
def plot_sankey(self,
150150
width_var: str = 'mass_wet',
151151
color_var: Optional[str] = None,
152-
edge_colormap: Optional[str] = 'viridis',
152+
edge_colormap: Optional[str] = 'copper_r',
153153
vmin: Optional[float] = None,
154154
vmax: Optional[float] = None,
155155
) -> go.Figure:
@@ -181,7 +181,7 @@ def table_plot(self,
181181
table_even_color: str = 'lightgray',
182182
sankey_width_var: str = 'mass_wet',
183183
sankey_color_var: Optional[str] = None,
184-
sankey_edge_colormap: Optional[str] = 'copper',
184+
sankey_edge_colormap: Optional[str] = 'copper_r',
185185
sankey_vmin: Optional[float] = None,
186186
sankey_vmax: Optional[float] = None
187187
) -> go.Figure:

examples/plot_demo.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import pandas as pd
9+
import plotly
910
from plotly.graph_objs import Figure
1011
from test.data.sample_data import sample_data
1112
from elphick.mass_composition import MassComposition
@@ -53,8 +54,6 @@
5354
# Create a ternary diagram for 3 composition variables
5455

5556
fig4 = obj_mc.plot_ternary(variables=['SiO2', 'Al2O3', 'LOI'], color='group')
56-
# save the figure for use as the sphinx-gallery thumbnail
57-
# fig4.write_image(Path(__file__).parent.parent / 'docs/source/_static/ternary.png')
58-
# sphinx_gallery_thumbnail_path = '_static/ternary.png'
59-
fig4
57+
# noinspection PyTypeChecker
58+
plotly.io.show(fig4) # this call to show will set the thumbnail for use in the gallery
6059

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mass-composition"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
description = "For managing multi-dimensional mass-composition datasets, supporting weighted mathematical operations and visualisation."
55
authors = ["Greg <greg@elphick.com.au>"]
66
packages = [{ include = "elphick/mass_composition" }]

0 commit comments

Comments
 (0)