Skip to content

Commit 1c15e1b

Browse files
authored
Fix errors in a hint[Name]=on styleCheck=error styleCheck=usages (#182)
compilation mode (which seems reasonable to support).
1 parent 272c3ef commit 1c15e1b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ggplotnim.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,7 +3360,7 @@ proc determinePlotHeight(theme: Theme, filledScales: FilledScales, width, height
33603360
let xS = if theme.xRange.isSome: theme.xRange.unsafeGet else: filledScales.xScale
33613361
let xD = xS.high - xS.low
33623362
let yS = if theme.yRange.isSome: theme.yRange.unsafeGet else: filledScales.yScale
3363-
let yD = ys.high - ys.low
3363+
let yD = yS.high - yS.low
33643364
let ratio = yD / xD
33653365
let spacingLR = add(layout.left, layout.right)
33663366
doAssert spacingLR.unit == ukCentimeter

src/ggplotnim/ggplot_drawing.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ proc drawRaster(view: var Viewport, fg: FilledGeom, df: DataFrame) =
336336
numY = (height / hv).round.int
337337
cMap = fg.colorScale
338338

339-
let α = if fg.geom.userstyle.alpha.isSome: fg.geom.userstyle.alpha.get else: 1.0
339+
let α = if fg.geom.userStyle.alpha.isSome: fg.geom.userStyle.alpha.get else: 1.0
340340
let αU32 = clamp(α * 255.0, 0.0, 255.0).uint32
341341
var drawCb = proc(): seq[uint32] =
342342
result = newSeq[uint32](df.len)

src/ggplotnim/postprocess_scales.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,13 @@ proc fillOptFields(fg: var FilledGeom, fs: FilledScales, df: var DataFrame) =
362362
fg.invTrans = fs.invTransC
363363
## Assign x / y scale of *raster* data
364364
block RasterScales:
365-
let xCol = df[xs.getColName]
365+
let xCol = df[xS.getColName]
366366
if xCol.kind in {colFloat, colInt}:
367367
fg.rasterXScale = (low: xCol.toTensor(float).min, high: xCol.toTensor(float).max)
368368
else:
369369
raise newException(ValueError, "The `x` data aesthetics for the raster plot is neither " &
370370
"`float` or `int` data. Instead it is: " & $xCol.kind)
371-
let yCol = df[ys.getColName]
371+
let yCol = df[yS.getColName]
372372
if yCol.kind in {colFloat, colInt}:
373373
fg.rasterYScale = (low: yCol.toTensor(float).min, high: yCol.toTensor(float).max)
374374
else:

0 commit comments

Comments
 (0)