Skip to content

Commit

Permalink
Merge branch 'master' into trans-log2
Browse files Browse the repository at this point in the history
  • Loading branch information
RYangazov committed Nov 20, 2023
2 parents d090fa2 + d746336 commit bed5ffe
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 292 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ open class AxisComponentDemo : SimpleDemoBase(DEMO_BOX_SIZE) {
)
)

val axisTheme = when (orientation.isHorizontal) {
true -> theme.horizontalAxis(flipAxis = false)
false -> theme.verticalAxis(flipAxis = false)
}

val axis = AxisComponent(
length = axisLength,
orientation = orientation,
Expand All @@ -150,13 +155,12 @@ open class AxisComponentDemo : SimpleDemoBase(DEMO_BOX_SIZE) {
coord,
DoubleRectangle.XYWH(0, 0, DEMO_BOX_SIZE.x, DEMO_BOX_SIZE.y),
flipAxis = false,
orientation.isHorizontal,
orientation,
axisTheme
),
//gridLineLength = 100.0,
//gridLineDistance = 0.0,
axisTheme = if (orientation.isHorizontal) theme.horizontalAxis(flipAxis = false) else theme.verticalAxis(
flipAxis = false
),
axisTheme = axisTheme,
//gridTheme = if (orientation.isHorizontal) theme.panel().gridX() else theme.panel().gridY()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// X axis
val axisTheme = theme.horizontalAxis(flipAxis = false)
val orientation = Orientation.BOTTOM
val axis = AxisComponent(
length = rangeX,
orientation = Orientation.BOTTOM,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleX.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = true,
orientation,
axisTheme
),
//gridLineLength = rangeY,
//gridLineDistance = 0.0,
axisTheme = theme.horizontalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridX()
)

Expand All @@ -128,19 +131,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// Y axis
val orientation = Orientation.LEFT
val axisTheme = theme.verticalAxis(flipAxis = false)
val axis = AxisComponent(
length = rangeY,
orientation = Orientation.LEFT,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleY.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = false,
orientation,
axisTheme
),
//gridLineLength = rangeX,
//gridLineDistance = 0.0,
axisTheme = theme.verticalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridY()
)

Expand Down Expand Up @@ -292,19 +298,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// X axis
val orientation = Orientation.BOTTOM
val axisTheme = theme.horizontalAxis(flipAxis = false)
val axis = AxisComponent(
length = rangeX,
orientation = Orientation.BOTTOM,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleX.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = true,
orientation,
axisTheme
),
//gridLineLength = rangeY,
//gridLineDistance = 0.0,
axisTheme = theme.horizontalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridX()
)

Expand All @@ -316,19 +325,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// Y axis
val orientation = Orientation.LEFT
val axisTheme = theme.verticalAxis(flipAxis = false)
val axis = AxisComponent(
length = rangeY,
orientation = Orientation.LEFT,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleY.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = false,
orientation,
axisTheme
),
//gridLineLength = rangeX,
//gridLineDistance = 0.0,
axisTheme = theme.verticalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridY()
)

Expand Down Expand Up @@ -422,19 +434,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// X axis
val orientation = Orientation.BOTTOM
val axisTheme = theme.horizontalAxis(flipAxis = false)
val axis = AxisComponent(
length = rangeX,
orientation = Orientation.BOTTOM,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleX.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = true,
orientation,
axisTheme
),
//gridLineLength = rangeY,
//gridLineDistance = 0.0,
axisTheme = theme.horizontalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridX()
)

Expand All @@ -446,19 +461,22 @@ open class ScatterDemo : SimpleDemoBase() {

run {
// Y axis
val orientation = Orientation.LEFT
val axisTheme = theme.verticalAxis(flipAxis = false)
val axis = AxisComponent(
length = rangeY,
orientation = Orientation.LEFT,
orientation = orientation,
breaksData = AxisUtil.breaksData(
scaleY.getScaleBreaks(),
coord,
domain = DoubleRectangle.hvRange(domainX, domainY),
flipAxis = false,
horizontal = false,
orientation,
axisTheme
),
//gridLineLength = rangeX,
//gridLineDistance = 0.0,
axisTheme = theme.verticalAxis(flipAxis = false),
axisTheme = axisTheme,
//gridTheme = theme.panel().gridY()
)

Expand Down
3 changes: 2 additions & 1 deletion future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- Facets: order = 0 doesn't work as expected [[#923](https://github.com/JetBrains/lets-plot/issues/923)].
- geom_livemap: fix missing styles (e.g. road outline on high zooms) [[#926](https://github.com/JetBrains/lets-plot/issues/926)].
- geom_livemap: freeze at zoom 10 [[#892](https://github.com/JetBrains/lets-plot/issues/892)].
- scale_x_log2(), scale_y_log2() as a shortcut for trans='log2' [[#922](https://github.com/JetBrains/lets-plot/issues/922)].
- Enormous CPU / Time/ Memory consumption on some data [[#932](https://github.com/JetBrains/lets-plot/issues/932)].
- scale_x_log2(), scale_y_log2() as a shortcut for trans='log2' [[#922](https://github.com/JetBrains/lets-plot/issues/922)].
Loading

0 comments on commit bed5ffe

Please sign in to comment.