From 2f3c8f5415b40ee8c5b5cc80a7e1b87c3c1b8a6f Mon Sep 17 00:00:00 2001 From: Vindaar Date: Sat, 26 Oct 2024 11:20:52 +0200 Subject: [PATCH 1/3] make sure discreteness is set for log2 / log10 scales Without it if the data is interpreted to be discrete and not continuous, we run into a invalid field of variant object issue. --- src/ggplotnim.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ggplotnim.nim b/src/ggplotnim.nim index 118376ae..6f66ca8d 100644 --- a/src/ggplotnim.nim +++ b/src/ggplotnim.nim @@ -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) @@ -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) @@ -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) @@ -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) From 52ab0252c4e076c26ce9afbf0dcbd063c5f0136f Mon Sep 17 00:00:00 2001 From: Vindaar Date: Sat, 26 Oct 2024 11:23:09 +0200 Subject: [PATCH 2/3] [CI] fix push events to only run when pushing to master branch --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05b8a303..f7a9559a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,8 @@ on: - 'src/**' - 'ggplotnim.nimble' - '.github/workflows/ci.yml' + branches: + - 'master' pull_request: paths: - 'tests/**' From 1e056cd3e45dc2d2a114f486da8c69d43e1105ee Mon Sep 17 00:00:00 2001 From: Vindaar Date: Sat, 26 Oct 2024 11:24:17 +0200 Subject: [PATCH 3/3] update changelog --- changelog.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.org b/changelog.org index 61968ace..2a46c073 100644 --- a/changelog.org +++ b/changelog.org @@ -1,3 +1,7 @@ +* v0.7.2 +- fix ~scale_x/y_log2/10~ when using it on scales that 'appear' to be + discrete based on their data. It was missing the boolean to indicate + that a fixed discreteness is set * v0.7.1 - update datamancer dependency for the fix of ~arrange~ in https://github.com/SciNim/Datamancer/pull/68 for issue