-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adding docs and new plots for blog
- Loading branch information
1 parent
111df6d
commit 0953a6a
Showing
19 changed files
with
199 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
modules/underdog-plots-domain/src/main/groovy/underdog/plots/dsl/VisualMap.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package underdog.plots.dsl | ||
|
||
import underdog.plots.ast.Node | ||
|
||
@Node | ||
class VisualMap { | ||
Number min | ||
Number max | ||
Boolean calculable | ||
String orient | ||
String left | ||
String bottom | ||
Boolean show | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
modules/underdog-plots-domain/src/main/groovy/underdog/plots/dsl/series/HeatmapSeries.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package underdog.plots.dsl.series | ||
|
||
import underdog.plots.ast.Node | ||
import underdog.plots.dsl.Series | ||
|
||
@Node | ||
class HeatmapSeries extends Series { | ||
String type = 'heatmap' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
modules/underdog-plots/src/main/groovy/underdog/plots/charts/CorrelationMatrix.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package underdog.plots.charts | ||
|
||
import groovy.transform.InheritConstructors | ||
import underdog.plots.Options | ||
import underdog.plots.dsl.series.HeatmapSeries | ||
|
||
/** | ||
* @since 0.1.0 | ||
*/ | ||
@InheritConstructors | ||
class CorrelationMatrix extends Chart { | ||
|
||
/** | ||
* @param xs | ||
* @param ys | ||
* @param heatmapData | ||
* @return | ||
* @since 0.1.0 | ||
*/ | ||
Options correlationMatrix( | ||
List labels, | ||
double[][] heatmapData | ||
) { | ||
def finalData = [] | ||
labels.eachWithIndex { Object left, int i -> | ||
labels.eachWithIndex { Object right, int j -> | ||
finalData << [i, j, heatmapData[i][j]] | ||
} | ||
} | ||
|
||
return create { | ||
grid { | ||
bottom('100') | ||
} | ||
xAxis { | ||
show(true) | ||
type('category') | ||
data(labels) | ||
axisLabel { | ||
rotate(90) | ||
} | ||
} | ||
yAxis { | ||
show(true) | ||
inverse(true) | ||
data(labels) | ||
} | ||
visualMap { | ||
min(0) | ||
max(1) | ||
show(false) | ||
} | ||
series(HeatmapSeries) { | ||
data(finalData) | ||
label { | ||
show(true) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.