Skip to content

Commit fca38d4

Browse files
committed
Docstring typos.
1 parent 9b7a293 commit fca38d4

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

spork/charts.janet

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
(defdyn *background-color* "Default background color for chart rendering")
4747
(defdyn *grid-color* "Default color for grid lines")
4848
(defdyn *padding* "Default padding for charts")
49-
(defdyn *color-seed* "Random seed to use when picking psuedo-random colors for charts")
49+
(defdyn *color-seed* "Random seed to use when picking pseudo-random colors for charts")
5050

5151
# Default defaults
5252
(def- default-font :olive)
@@ -405,7 +405,7 @@
405405

406406
(defn- draw-color-map
407407
```
408-
Draw a rectable that describes a color-map. Will draw the gradient
408+
Draw a rectangle that describes a color-map. Will draw the gradient
409409
horizontally by default, but layout can be one of :h, :v, :horizontal, or :vertical.
410410
```
411411
[canvas color-map x y w h &opt layout]
@@ -1070,7 +1070,7 @@
10701070
* :num-rows - Number of rows to draw.
10711071
* :box-gap - Number of pixels between boxes on the heat map
10721072
* :font - font used to draw optional text in cells
1073-
* :cell-text-color - color of text, defaults to black
1073+
* :cell-text-color - color of text, defaults to black or white depending on the cell color
10741074
10751075
Returns the modified original canvas.
10761076
```
@@ -1091,7 +1091,6 @@
10911091
(def {:width canvas-width :height canvas-height} (g/unpack canvas))
10921092
(default box-gap 0)
10931093
(default font (dyn *font* default-font))
1094-
(default cell-text-color nil) # (dyn *text-color* default-text-color))
10951094

10961095
# Calculate box sizes - not always integers!
10971096
(def box-width (- (/ (- canvas-width box-gap) num-columns) box-gap))
@@ -1109,7 +1108,6 @@
11091108
(g/fill-rect canvas pixel-x pixel-y (- next-pixel-x pixel-x) (- next-pixel-y pixel-y) color)
11101109

11111110
# Per cell text
1112-
# TODO - get text color by inverting cell color?
11131111
(when-let [text (and cell-text-fn (cell-text-fn x y))]
11141112
(def [w h] (text-measure text font 1 0))
11151113
(def text-x (math/floor (- (mean [pixel-x next-pixel-x]) (/ w 2))))
@@ -1140,7 +1138,6 @@
11401138
Data Frame Input
11411139
* :data - a dataframe table that contains a grid of cell
11421140
* :data-scale - map numeric data to a [0.0, 1.0] range with a scale factor or function. Is the constant 1.0 by default.
1143-
and maximum values in data to 0 and 1 respectively.
11441141
* :xs - a list of x columns - these are keys in `data`
11451142
* :ys - (optional) keys into each column - by default this is just (range num-rows-in-data).
11461143

0 commit comments

Comments
 (0)