TablePlotter
¶
A class that contains plotting methods for a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table |
Table |
The table to plot. | - |
Examples:
Stub code in TablePlotter.sdsstub
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
boxPlots
¶
Create a box plot for every numerical column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The box plot(s) as an image. |
Examples:
pipeline example {
val table = Table({"a":[1, 2], "b": [3, 42]});
val image = table.plot.boxPlots();
}
Stub code in TablePlotter.sdsstub
correlationHeatmap
¶
Plot a correlation heatmap for all numerical columns of this Table
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table({"temperature": [10, 15, 20, 25, 30], "sales": [54, 74, 90, 206, 210]});
val image = table.plot.correlationHeatmap();
}
Stub code in TablePlotter.sdsstub
histogram2d
¶
Create a 2D histogram for two columns in the table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xName |
String |
The name of the column to be plotted on the x-axis. | - |
yName |
String |
The name of the column to be plotted on the y-axis. | - |
xMaxBinCount |
Int |
The maximum number of bins to use in the histogram for the x-axis. Default is 10. | 10 |
yMaxBinCount |
Int |
The maximum number of bins to use in the histogram for the y-axis. Default is 10. | 10 |
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table(
{
"a": [1, 2, 3, 4, 5],
"b": [2, 3, 4, 5, 6],
}
);
val image = table.plot.histogram2d("a", "b");
}
Stub code in TablePlotter.sdsstub
histograms
¶
Plot a histogram for every column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
maxBinCount |
Int |
The maximum number of bins to use in the histogram. Default is 10. | 10 |
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table({"a": [2, 3, 5, 1], "b": [54, 74, 90, 2014]});
val image = table.plot.histograms();
}
Stub code in TablePlotter.sdsstub
linePlot
¶
Create a line plot for two columns in the table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xName |
String |
The name of the column to be plotted on the x-axis. | - |
yNames |
List<String> |
The name(s) of the column(s) to be plotted on the y-axis. | - |
showConfidenceInterval |
Boolean |
Whether a confidence interval is shown. | true |
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table(
{
"a": [1, 2, 3, 4, 5],
"b": [2, 3, 4, 5, 6],
}
);
val image = table.plot.linePlot("a", ["b"]);
}
Stub code in TablePlotter.sdsstub
movingAveragePlot
¶
Create a moving average plot for the y column and plot it by the x column in the table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xName |
String |
The name of the column to be plotted on the x-axis. | - |
yName |
String |
The name of the column to be plotted on the y-axis. | - |
windowSize |
Int |
The size of the moving average window | - |
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table(
{
"a": [1, 2, 3, 4, 5],
"b": [2, 3, 4, 5, 6],
}
);
val image = table.plot.movingAveragePlot("a", "b", windowSize = 2);
}
Stub code in TablePlotter.sdsstub
scatterPlot
¶
Create a scatter plot for two columns in the table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
xName |
String |
The name of the column to be plotted on the x-axis. | - |
yNames |
List<String> |
The name(s) of the column(s) to be plotted on the y-axis. | - |
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The plot as an image. |
Examples:
pipeline example {
val table = Table(
{
"a": [1, 2, 3, 4, 5],
"b": [2, 3, 4, 5, 6],
}
);
val image = table.plot.scatterPlot("a", ["b"]);
}
Stub code in TablePlotter.sdsstub
violinPlots
¶
Create a violin plot for every numerical column.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
theme |
literal<"dark", "light"> |
The color theme of the plot. Default is "light". | "light" |
Results:
Name | Type | Description |
---|---|---|
plot |
Image |
The violin plot(s) as an image. |
Examples: