Skip to content

Commit

Permalink
make sure discreteness is set for log2 / log10 scales
Browse files Browse the repository at this point in the history
Without it if the data is interpreted to be discrete and not
continuous, we run into a invalid field of variant object issue.
  • Loading branch information
Vindaar committed Oct 26, 2024
1 parent dea5bf2 commit 2f3c8f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ggplotnim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ proc scale_x_log10*[T: int | seq[SomeNumber]](breaks: T = newSeq[float]()): Scal
scKind: scTransformedData,
axKind: akX,
dcKind: dcContinuous,
hasDiscreteness: true,
trans: trans,
invTrans: invTrans)
result.assignBreaks(breaks)
Expand All @@ -939,6 +940,7 @@ proc scale_y_log10*[T: int | seq[SomeNumber]](breaks: T = newSeq[float]()): Scal
scKind: scTransformedData,
axKind: akY,
dcKind: dcContinuous,
hasDiscreteness: true,
trans: trans,
invTrans: invTrans)
result.assignBreaks(breaks)
Expand All @@ -961,6 +963,7 @@ proc scale_x_log2*[T: int | seq[SomeNumber]](breaks: T = newSeq[float]()): Scale
scKind: scTransformedData,
axKind: akX,
dcKind: dcContinuous,
hasDiscreteness: true,
trans: trans,
invTrans: invTrans)
result.assignBreaks(breaks)
Expand All @@ -983,6 +986,7 @@ proc scale_y_log2*[T: int | seq[SomeNumber]](breaks: T = newSeq[float]()): Scale
scKind: scTransformedData,
axKind: akY,
dcKind: dcContinuous,
hasDiscreteness: true,
trans: trans,
invTrans: invTrans)
result.assignBreaks(breaks)
Expand Down

0 comments on commit 2f3c8f5

Please sign in to comment.