Skip to content

Commit

Permalink
made new release build
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBanham committed Jul 4, 2022
1 parent 75df724 commit 312cb82
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 9 deletions.
Binary file removed dist/vispm-0.0.4-py3-none-any.whl
Binary file not shown.
Binary file removed dist/vispm-0.0.4.tar.gz
Binary file not shown.
Binary file added dist/vispm-0.0.5-py3-none-any.whl
Binary file not shown.
Binary file added dist/vispm-0.0.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = vispm
version = 0.0.4
version = 0.0.5
author = Adam
author_email = [email protected]
description = A visulisation package for process mining activties
Expand Down
78 changes: 70 additions & 8 deletions src/vispm.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: vispm
Version: 0.0.4
Version: 0.0.5
Summary: A visulisation package for process mining activties
Home-page: https://github.com/AdamBanham/vispm
Author: Adam
Expand Down Expand Up @@ -70,8 +70,6 @@ Below are some examples of using this class and playing around with custom colou
<div style="width:100%;display:inline-block">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_Chart_of_BPI_Challenge_2012.png" style="width:48%" alt="Dotted Chart for BPIC 2012">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_Chart_of_BPI_Challenge_2017.png" style="width:48%" alt="Dotted Chart for BPIC 2017">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_Chart_of_BPI_Challenge_2018.png" style="width:48%" alt="Dotted Chart for BPIC 2018">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_Chart_of_BPI_Challenge_2019.png" style="width:48%" alt="Dotted Chart for BPIC 2019">
</div>

##### Extensions
Expand All @@ -87,26 +85,90 @@ from vispm import StaticDottedChartPresentor,DottedColourHistogramExtension

presentor = StaticDottedChartPresentor(log,dpi=100,
event_colour_scheme=StaticDottedChartPresentor.EventColourScheme.EventLabel,
colormap=HIGH_CONTRAST_WARM
colormap=HIGH_CONTRAST_COOL
)
ext = DottedColourHistogramExtension(direction=DottedColourHistogramExtension.Direction.NORTH)
presentor.add_extension(ext)
ext = DottedColourHistogramExtension(direction=DottedColourHistogramExtension.Direction.SOUTH,
plot_axes=DottedColourHistogramExtension.PlotAxes.X)
bin_axes=DottedColourHistogramExtension.PlotAxes.X)
presentor.add_extension(ext)
ext = DottedColourHistogramExtension(direction=DottedColourHistogramExtension.Direction.WEST)
presentor.add_extension(ext)
ext = DottedColourHistogramExtension(direction=DottedColourHistogramExtension.Direction.EAST,
plot_axes=DottedColourHistogramExtension.PlotAxes.X)
bin_axes=DottedColourHistogramExtension.PlotAxes.X)
presentor.add_extension(ext)
presentor.plot()

```

<div style="width:100%;display:inline-block">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_Chart_Histogram.png" alt="Dotted Chart with Colour Histogram" style="transform: scale(0.5)">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_ext_clrhist.png" alt="Dotted Chart with Colour Histogram" style="transform: scale(0.5);width: 48%">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_ext_clrhist_2.png" alt="Dotted Chart with Colour Histogram" style="transform: scale(0.5);width: 48%">
</div>

###### DottedEventHistogramExtension

This extension plots a histogram based on the events within a dotted chart. Events will be broken down by the label for each event in each bin. This extension uses a colour imputer that is independent of the graph, meaning different colour schemes can be used for each extension.

1. setup up colour schemes to use
```python
from vispm.helpers.colours.colourmaps import HIGH_CONTRAST_COOL,HIGH_CONTRAST_WARM
from vispm.helpers.colours.colourmaps import EARTH,COOL_WINTER,

import numpy as np
from matplotlib.colors import ListedColormap
from matplotlib.cm import get_cmap

colourmaps = [COOL_WINTER,EARTH,HIGH_CONTRAST_COOL,HIGH_CONTRAST_WARM]
seq_colourmap = np.vstack(
(
colourmaps[0](np.linspace(0.20,1,8)),
colourmaps[1](np.linspace(0.20,1,8)),
colourmaps[2](np.linspace(0.20,1,8)),
colourmaps[3](np.linspace(0.20,1,8))
)
)
seq_colourmap = ListedColormap(seq_colourmap, name='VARIANCE')
cmap = get_cmap(HIGH_CONTRAST_COOL, 26)
```

2. create a presentor and add extensions
```python
presentor = StaticDottedChartPresentor(log,dpi=100,
event_colour_scheme=StaticDottedChartPresentor.EventColourScheme.EventLabel,
colormap=cmap
)

ext = DottedEventHistogramExtension(
direction=DottedEventHistogramExtension.Direction.SOUTH,
bin_axes=DottedEventHistogramExtension.PlotAxes.X,
colourmap=seq_colourmap
)
presentor.add_extension(ext)
ext = DottedEventHistogramExtension(
direction=DottedEventHistogramExtension.Direction.NORTH,
bin_axes=DottedEventHistogramExtension.PlotAxes.Y,
colourmap=seq_colourmap
)
presentor.add_extension(ext)
ext = DottedEventHistogramExtension(
direction=DottedEventHistogramExtension.Direction.WEST,
bin_axes=DottedEventHistogramExtension.PlotAxes.Y,
colourmap=cmap
)
presentor.add_extension(ext)
ext = DottedEventHistogramExtension(
direction=DottedEventHistogramExtension.Direction.EAST,
bin_axes=DottedEventHistogramExtension.PlotAxes.X,
colourmap=cmap
)
presentor.add_extension(ext)

presentor.plot()
```

<div style="width:100%;display:inline-block">
<img src="https://vispm.s3.ap-southeast-2.amazonaws.com/Dotted_ext_evhist.png" alt="Dotted Chart with Event Histogram" style="transform: scale(0.5);width: 48%">
</div>

#### Running Presentors

Expand Down
1 change: 1 addition & 0 deletions src/vispm.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/vispm/extensions/__init__.py
src/vispm/extensions/_base.py
src/vispm/extensions/dotted/__init__.py
src/vispm/extensions/dotted/colour_histogram.py
src/vispm/extensions/dotted/event_histogram.py
src/vispm/helpers/__init__.py
src/vispm/helpers/colours/__init__.py
src/vispm/helpers/colours/colourmaps.py
Expand Down

0 comments on commit 312cb82

Please sign in to comment.