Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coord_polar: axis, ticks, labels, xlim/ylim #979

Merged
merged 18 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c574810
Make expand additive
IKupriyanov-HORIS Dec 20, 2023
2467a22
coord_polar: reduce number of ticks for v axis
IKupriyanov-HORIS Dec 20, 2023
4fc32be
coord_polar: replace absolute expand with relative
IKupriyanov-HORIS Dec 20, 2023
4be95a0
coord_polar: v axis ticks alignment
IKupriyanov-HORIS Dec 20, 2023
e3d7535
coord_polar: hardcoded anchor for ticks
IKupriyanov-HORIS Dec 20, 2023
a9705f1
coord_polar: more ticks for circle axis
IKupriyanov-HORIS Dec 21, 2023
52151a7
coord_polar: fix horizontal axis ticks order, fix axis circle positio…
IKupriyanov-HORIS Dec 21, 2023
7af0732
coord_polar: fix horizontal axis first and last ticks overlapping
IKupriyanov-HORIS Dec 21, 2023
f6fd891
coord_polar: update notebook
IKupriyanov-HORIS Dec 22, 2023
0900649
coord_polar: replace thetaFromX with flipped
IKupriyanov-HORIS Dec 25, 2023
f54d197
coord_polar: temp fix for axis, need proper fix for the domain flip
IKupriyanov-HORIS Dec 26, 2023
62f8d02
coord_polar: properly handle theta=y in PolarCoordinateSystem
IKupriyanov-HORIS Dec 27, 2023
dc71ebc
coord_polar: handle theta=y mostly in PolarCoordinateSystem. Investig…
IKupriyanov-HORIS Dec 27, 2023
9c94803
coord_polar: fixed breaks and ticks. The only not working case is a Y…
IKupriyanov-HORIS Dec 28, 2023
a550e39
coord_polar: fixed breaks and ticks with start parameter
IKupriyanov-HORIS Dec 28, 2023
b99f9ea
coord_polar: minor code cleanup
IKupriyanov-HORIS Dec 29, 2023
09921c8
coord_polar: fix domain for discrete angle scale
IKupriyanov-HORIS Jan 1, 2024
0e4782f
coord_polar: add xlim/ylim for radar plot / lollipop
IKupriyanov-HORIS Jan 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
coord_polar: more ticks for circle axis
  • Loading branch information
IKupriyanov-HORIS committed Jan 5, 2024
commit a9705f1fd3b99448c9ac09927c43b558fae686ca
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal class TopDownTileLayout(

override fun doLayout(preferredSize: DoubleVector, coordProvider: CoordProvider): TileLayoutInfo {

var geomAreaInsets = computeAxisInfos(
val geomAreaInsets = computeAxisInfos(
axisLayoutQuad,
preferredSize,
hDomain, vDomain,
Expand Down Expand Up @@ -100,9 +100,9 @@ internal class TopDownTileLayout(
.dimension
.let(marginsLayout::toInnerSize)
.y
.let { geomHeight ->
.let { height ->
// For polar coord axis height is half of geom height - it starts from the center.
geomHeight.takeUnless { coordProvider is PolarCoordProvider } ?: (geomHeight / 2)
height.takeUnless { coordProvider is PolarCoordProvider } ?: (height / 2)
}

val insetsVAxis = insetsInitial.layoutVAxis(vDomain, axisHeightEstim)
Expand All @@ -115,7 +115,14 @@ internal class TopDownTileLayout(
coordProvider
)

val hAxisLength = marginsLayout.toInnerBounds(plottingArea).width
val hAxisLength = marginsLayout
.toInnerBounds(plottingArea)
.width
.let { width ->
// h axis in polar coord is rendered as a circle - increase its length to make more tick.
width.takeUnless { coordProvider is PolarCoordProvider } ?: (width * 1.5)
}

val insetsHVAxis = insetsVAxis.layoutHAxis(
hDomain,
hAxisLength
Expand Down