From 351997cc90a8f14bfd71c9e460c3f1926ff73aa5 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Mon, 24 Apr 2023 15:43:12 +0200 Subject: [PATCH 01/12] Add conditional including of zero to the Y-range for the lollipop geometry. --- .../datalore/plot/builder/assemble/GeomLayerBuilder.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt index b203b97fead..ced78430a0d 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt @@ -16,6 +16,7 @@ import jetbrains.datalore.plot.base.data.TransformVar import jetbrains.datalore.plot.base.geom.GeomBase import jetbrains.datalore.plot.base.geom.LiveMapGeom import jetbrains.datalore.plot.base.geom.LiveMapProvider +import jetbrains.datalore.plot.base.geom.LollipopGeom import jetbrains.datalore.plot.base.interact.ContextualMapping import jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpec import jetbrains.datalore.plot.base.interact.MappedDataAccess @@ -320,7 +321,11 @@ class GeomLayerBuilder( override fun rangeIncludesZero(aes: Aes<*>): Boolean { @Suppress("NAME_SHADOWING") val aes = aes.afterOrientation(isYOrientation) - return aestheticsDefaults.rangeIncludesZero(aes) + return if (geom is LollipopGeom && aes == Aes.Y) { + geom.direction == LollipopGeom.Direction.ORTHOGONAL_TO_AXIS && geom.slope == 0.0 && geom.intercept == 0.0 + } else { + aestheticsDefaults.rangeIncludesZero(aes) + } } override fun setLiveMapProvider(liveMapProvider: LiveMapProvider) { From 47294a8988e368fb319f0378d8c561061085c246 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 11:21:26 +0200 Subject: [PATCH 02/12] Increase multiplicative expand for the continuous scale when geometry is lollipop. --- .../kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt | 5 +++-- .../datalore/plot/builder/assemble/PositionalScalesUtil.kt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt index ba67f316237..ebbdecd1316 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt @@ -168,11 +168,12 @@ object PlotUtil { internal fun rangeWithExpand( range: DoubleSpan?, scale: Scale, - includeZero: Boolean + includeZero: Boolean, + mulExpCoeff: Double ): DoubleSpan? { if (range == null) return null - val mulExp = scale.multiplicativeExpand + val mulExp = mulExpCoeff * scale.multiplicativeExpand val addExp = scale.additiveExpand // Compute expands in terms of the original data. diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt index 8217a81cac2..aefb42f3ced 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt @@ -362,8 +362,9 @@ internal object PositionalScalesUtil { true -> updateRange(DoubleSpan.singleton(0.0), range) false -> range } + val mulExpCoeff = 1.0.takeUnless { layers.any { it.geomKind == GeomKind.LOLLIPOP } } ?: 2.0 - return PlotUtil.rangeWithExpand(range, scale, includeZero) + return PlotUtil.rangeWithExpand(range, scale, includeZero, mulExpCoeff) } private fun updateRange(values: Iterable, wasRange: DoubleSpan?): DoubleSpan { From 961d56b41f31b448679bdbfdd90fe9bc67829b51 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 11:21:53 +0200 Subject: [PATCH 03/12] Update the cookbook-notebook for the lollipop geometry. --- docs/f-23b/geom_lollipop.ipynb | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/f-23b/geom_lollipop.ipynb b/docs/f-23b/geom_lollipop.ipynb index f7cb76558a2..b45fdf04a4f 100644 --- a/docs/f-23b/geom_lollipop.ipynb +++ b/docs/f-23b/geom_lollipop.ipynb @@ -58,7 +58,7 @@ " \n", " \n", @@ -252,7 +252,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -318,7 +318,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -453,7 +453,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -521,7 +521,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -609,7 +609,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -716,7 +716,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -813,7 +813,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 11, From b8f4b9d9ff39c11f85956b4972bb21d232b101c5 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 15:09:03 +0200 Subject: [PATCH 04/12] Refactor continuous scale expanding for the lollipop geometry. --- .../kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt | 8 ++++++-- .../plot/builder/assemble/PositionalScalesUtil.kt | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt index ebbdecd1316..c8701fa3686 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt @@ -169,11 +169,15 @@ object PlotUtil { range: DoubleSpan?, scale: Scale, includeZero: Boolean, - mulExpCoeff: Double + requireAdditionalExpand: Boolean ): DoubleSpan? { if (range == null) return null - val mulExp = mulExpCoeff * scale.multiplicativeExpand + val mulExp = if (requireAdditionalExpand) { + 2 * scale.multiplicativeExpand + } else { + scale.multiplicativeExpand + } val addExp = scale.additiveExpand // Compute expands in terms of the original data. diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt index aefb42f3ced..ef6b94f4bc6 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt @@ -362,9 +362,10 @@ internal object PositionalScalesUtil { true -> updateRange(DoubleSpan.singleton(0.0), range) false -> range } - val mulExpCoeff = 1.0.takeUnless { layers.any { it.geomKind == GeomKind.LOLLIPOP } } ?: 2.0 - return PlotUtil.rangeWithExpand(range, scale, includeZero, mulExpCoeff) + val requireAdditionalExpand = layers.any { it.geomKind == GeomKind.LOLLIPOP } + + return PlotUtil.rangeWithExpand(range, scale, includeZero, requireAdditionalExpand) } private fun updateRange(values: Iterable, wasRange: DoubleSpan?): DoubleSpan { From 68d251f64f5644078f92690752a75c4a6d349dbb Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 15:41:03 +0200 Subject: [PATCH 05/12] Refactor scale expand parameters for the lollipop geometry. --- .../jetbrains/datalore/plot/builder/PlotUtil.kt | 13 ++++++------- .../plot/builder/assemble/PositionalScalesUtil.kt | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt index c8701fa3686..50dea50b1ef 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt @@ -169,16 +169,15 @@ object PlotUtil { range: DoubleSpan?, scale: Scale, includeZero: Boolean, - requireAdditionalExpand: Boolean + wideExpand: Boolean ): DoubleSpan? { if (range == null) return null - val mulExp = if (requireAdditionalExpand) { - 2 * scale.multiplicativeExpand - } else { - scale.multiplicativeExpand + val multExpand = when (wideExpand) { + false -> scale.multiplicativeExpand + true -> scale.multiplicativeExpand * 2.0 } - val addExp = scale.additiveExpand + val addExpand = scale.additiveExpand // Compute expands in terms of the original data. // Otherwise, can easily run into Infinities then using 'log10' transform @@ -193,7 +192,7 @@ object PlotUtil { val upperEndpoint = domain.upperEnd val length = upperEndpoint - lowerEndpoint - var lowerExpand = addExp + length * mulExp + var lowerExpand = addExpand + length * multExpand var upperExpand = lowerExpand if (includeZero) { // zero-based plots (like bar) - do not 'expand' on the zero-end diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt index ef6b94f4bc6..f11c3c8ad52 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt @@ -363,9 +363,9 @@ internal object PositionalScalesUtil { false -> range } - val requireAdditionalExpand = layers.any { it.geomKind == GeomKind.LOLLIPOP } + val wideExpand = layers.any { it.geomKind == GeomKind.LOLLIPOP } - return PlotUtil.rangeWithExpand(range, scale, includeZero, requireAdditionalExpand) + return PlotUtil.rangeWithExpand(range, scale, includeZero, wideExpand) } private fun updateRange(values: Iterable, wasRange: DoubleSpan?): DoubleSpan { From b0bf374bea056ce4f992de7cdc1fef4088a957a7 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 16:27:51 +0200 Subject: [PATCH 06/12] Fix rangeIncludesZero() for lollipops. --- .../datalore/plot/builder/assemble/GeomLayerBuilder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt index ced78430a0d..fdc213800df 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/GeomLayerBuilder.kt @@ -322,7 +322,8 @@ class GeomLayerBuilder( @Suppress("NAME_SHADOWING") val aes = aes.afterOrientation(isYOrientation) return if (geom is LollipopGeom && aes == Aes.Y) { - geom.direction == LollipopGeom.Direction.ORTHOGONAL_TO_AXIS && geom.slope == 0.0 && geom.intercept == 0.0 + // Pin the lollipops to an axis when baseline coincides with this axis and sticks are perpendicular to it + geom.slope == 0.0 && geom.intercept == 0.0 && geom.direction != LollipopGeom.Direction.ALONG_AXIS } else { aestheticsDefaults.rangeIncludesZero(aes) } From c449f995d90a56041cef945f14d9d9ccaa288a36 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Tue, 25 Apr 2023 16:50:45 +0200 Subject: [PATCH 07/12] Rerun cookbook-notebook for the lollipop geometry. --- docs/f-23b/geom_lollipop.ipynb | 50 ++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/docs/f-23b/geom_lollipop.ipynb b/docs/f-23b/geom_lollipop.ipynb index b45fdf04a4f..66660d4c113 100644 --- a/docs/f-23b/geom_lollipop.ipynb +++ b/docs/f-23b/geom_lollipop.ipynb @@ -58,7 +58,7 @@ " \n", " \n", @@ -252,7 +252,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -318,7 +318,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -453,7 +453,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -499,7 +502,8 @@ ], "source": [ "ggplot(df, aes(y=\"class\")) + \\\n", - " geom_lollipop(stat='count', orientation='y')" + " geom_lollipop(stat='count', orientation='y') + \\\n", + " theme_minimal()" ] }, { @@ -521,7 +525,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -609,7 +613,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -716,7 +720,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -813,7 +817,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 11, From 9824de69b366f83fe1dc8f41f7e1b7929374758c Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Thu, 27 Apr 2023 13:35:05 +0200 Subject: [PATCH 08/12] Change behaviour of the dir parameter for the lollipop geometry. --- .../plot/config/GeomProtoClientSide.kt | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/plot-config-portable/src/commonMain/kotlin/jetbrains/datalore/plot/config/GeomProtoClientSide.kt b/plot-config-portable/src/commonMain/kotlin/jetbrains/datalore/plot/config/GeomProtoClientSide.kt index ef0e8a3ec02..57eb3427c33 100644 --- a/plot-config-portable/src/commonMain/kotlin/jetbrains/datalore/plot/config/GeomProtoClientSide.kt +++ b/plot-config-portable/src/commonMain/kotlin/jetbrains/datalore/plot/config/GeomProtoClientSide.kt @@ -293,31 +293,11 @@ class GeomProtoClientSide(geomKind: GeomKind) : GeomProto(geomKind) { } GeomKind.LOLLIPOP -> return GeomProvider.lollipop { - // As in LayerConfig - val isYOrientation: Boolean = when (opts.hasOwn(Option.Layer.ORIENTATION)) { - true -> opts.getString(Option.Layer.ORIENTATION)?.lowercase()?.let { - when (it) { - "y" -> true - "x" -> false - else -> throw IllegalArgumentException("${Option.Layer.ORIENTATION} expected x|y but was $it") - } - } ?: false - - false -> false - } val directionValue = opts.getString(Lollipop.DIRECTION)?.lowercase() val direction = directionValue?.let { when (it) { - "v" -> if (isYOrientation) { - Direction.ALONG_AXIS - } else { - Direction.ORTHOGONAL_TO_AXIS - } - "h" -> if (isYOrientation) { - Direction.ORTHOGONAL_TO_AXIS - } else { - Direction.ALONG_AXIS - } + "v" -> Direction.ORTHOGONAL_TO_AXIS + "h" -> Direction.ALONG_AXIS "s" -> Direction.SLOPE else -> throw IllegalArgumentException( "Unsupported value for ${Lollipop.DIRECTION} parameter: '$it'. " + @@ -334,7 +314,6 @@ class GeomProtoClientSide(geomKind: GeomKind) : GeomProto(geomKind) { throw IllegalArgumentException( "Incompatible lollipop parameters: " + "${Lollipop.SLOPE}=$slope, " + - "${Option.Layer.ORIENTATION}='${if (isYOrientation) "y" else "x"}', " + "${Lollipop.DIRECTION}='${directionValue}'" ) } From 163d7bfbea74a3b0cc743c62d232988d5a5ef1b2 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 28 Apr 2023 12:54:10 +0200 Subject: [PATCH 09/12] Undo expanding scales for lollipops. --- .../jetbrains/datalore/plot/builder/PlotUtil.kt | 12 ++++-------- .../plot/builder/assemble/PositionalScalesUtil.kt | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt index 50dea50b1ef..ba67f316237 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/PlotUtil.kt @@ -168,16 +168,12 @@ object PlotUtil { internal fun rangeWithExpand( range: DoubleSpan?, scale: Scale, - includeZero: Boolean, - wideExpand: Boolean + includeZero: Boolean ): DoubleSpan? { if (range == null) return null - val multExpand = when (wideExpand) { - false -> scale.multiplicativeExpand - true -> scale.multiplicativeExpand * 2.0 - } - val addExpand = scale.additiveExpand + val mulExp = scale.multiplicativeExpand + val addExp = scale.additiveExpand // Compute expands in terms of the original data. // Otherwise, can easily run into Infinities then using 'log10' transform @@ -192,7 +188,7 @@ object PlotUtil { val upperEndpoint = domain.upperEnd val length = upperEndpoint - lowerEndpoint - var lowerExpand = addExpand + length * multExpand + var lowerExpand = addExp + length * mulExp var upperExpand = lowerExpand if (includeZero) { // zero-based plots (like bar) - do not 'expand' on the zero-end diff --git a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt index f11c3c8ad52..8217a81cac2 100644 --- a/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt +++ b/plot-builder-portable/src/commonMain/kotlin/jetbrains/datalore/plot/builder/assemble/PositionalScalesUtil.kt @@ -363,9 +363,7 @@ internal object PositionalScalesUtil { false -> range } - val wideExpand = layers.any { it.geomKind == GeomKind.LOLLIPOP } - - return PlotUtil.rangeWithExpand(range, scale, includeZero, wideExpand) + return PlotUtil.rangeWithExpand(range, scale, includeZero) } private fun updateRange(values: Iterable, wasRange: DoubleSpan?): DoubleSpan { From ce2bcd2c542771c4354fd3ba42493ad7527d0557 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 28 Apr 2023 13:00:32 +0200 Subject: [PATCH 10/12] Update API for geom_lollipop() (change behaviour of the dir parameter). --- python-package/lets_plot/plot/geom.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python-package/lets_plot/plot/geom.py b/python-package/lets_plot/plot/geom.py index 6b6db0589b7..9a899380772 100644 --- a/python-package/lets_plot/plot/geom.py +++ b/python-package/lets_plot/plot/geom.py @@ -6350,11 +6350,9 @@ def geom_lollipop(mapping=None, *, data=None, stat=None, position=None, show_leg orientation : {'x', 'y'}, default='x' Specify the axis that the baseline should run along. Possible values: 'x', 'y'. - dir : {'v', 'h', 's'} + dir : {'v', 'h', 's'}, default='v' Direction of the lollipop stick. 'v' for vertical, 'h' for horizontal, 's' for orthogonal to the baseline. - If `orientation='x'`, default `dir` is 'v'. - If `orientation='y'`, default `dir` is 'h'. fatten : float, default=2.5 A multiplicative factor applied to size of the point. slope : float From 74d26eb0fc3495536cc962ebcfd579fa8f0a2b7a Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 28 Apr 2023 13:01:37 +0200 Subject: [PATCH 11/12] Fix the future_changes.md file. --- future_changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/future_changes.md b/future_changes.md index c4ecea9a6e2..2aa3b293bbd 100644 --- a/future_changes.md +++ b/future_changes.md @@ -4,7 +4,7 @@ - New geometry `geom_lollipop()`. - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-23b/lollipop_plot.ipynb). + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-23b/geom_lollipop.ipynb). - `stroke` aesthetic for `geom_point()`, `geom_jitter()`, `geom_qq()`, `geom_qq2()`, `geom_pointrange()`, `geom_dotplot()`, `geom_ydotplot()` and `outlier_stroke` parameter for `geom_boxplot()`. @@ -14,7 +14,7 @@ - New aesthetic `linewidth`. Used only for `geom_lollipop()` at the moment. - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-23b/lollipop_plot.ipynb). + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-23b/geom_lollipop.ipynb). - the 'newline' character (`\n`) now works as `line break` in legend text ([[#726](https://github.com/JetBrains/lets-plot/issues/726)]) From b308b7b9c221edab8af21c2e1cebbb151afe3107 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Fri, 28 Apr 2023 13:23:07 +0200 Subject: [PATCH 12/12] Rebuild the cookbook-notebook for the lollipop geometry. --- docs/f-23b/geom_lollipop.ipynb | 48 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/docs/f-23b/geom_lollipop.ipynb b/docs/f-23b/geom_lollipop.ipynb index 66660d4c113..bf94f32d346 100644 --- a/docs/f-23b/geom_lollipop.ipynb +++ b/docs/f-23b/geom_lollipop.ipynb @@ -58,7 +58,7 @@ " \n", " \n", @@ -252,7 +252,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -318,7 +318,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -453,7 +453,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -525,7 +525,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -591,7 +592,8 @@ "ggplot(df, aes(\"hwy\", \"cty\")) + \\\n", " geom_bin2d(binwidth=[1, 1]) + \\\n", " ggmarginal(\"r\", size=.2, \\\n", - " layer=geom_lollipop(aes(color='..count..'), stat='count', orientation='y'))" + " layer=geom_lollipop(aes(color='..count..'), \\\n", + " stat='count', orientation='y', size=1))" ] }, { @@ -613,7 +615,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -720,7 +722,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -817,7 +819,7 @@ { "data": { "text/html": [ - "
\n", + "
\n", " " ], "text/plain": [ - "" + "" ] }, "execution_count": 11,