(data-axis-scales coord-type sx sy)The scales data :x and :y are read through, as [x-scale y-scale].
make-coord above decides this, and :flip is the one coordinate
system that parts it from the panel's drawn sx and sy: a flip
reads data y through sx and data x through sy.
A caller that scales a data value itself, rather than through the
coordinate function, has to ask here. render/panel.clj shifts a
:dx on a categorical axis by reading the category's place in its
own scale's domain, and reaching for sx there looked the category
up in the other axis's scale under a flip: category-index found
nothing, the label passed through unshifted, and the plot was drawn
with the shift missing and nothing said.
The scales data `:x` and `:y` are read through, as `[x-scale y-scale]`. `make-coord` above decides this, and `:flip` is the one coordinate system that parts it from the panel's drawn `sx` and `sy`: a flip reads data y through `sx` and data x through `sy`. A caller that scales a data value itself, rather than through the coordinate function, has to ask here. `render/panel.clj` shifts a `:dx` on a categorical axis by reading the category's place in its own scale's domain, and reaching for `sx` there looked the category up in the other axis's scale under a flip: `category-index` found nothing, the label passed through unshifted, and the plot was drawn with the shift missing and nothing said.
(invertible? coord-type)Whether coord-type has an inverse, i.e. a method of its own rather
than the nil-returning default.
Whether `coord-type` has an inverse, i.e. a method of its own rather than the nil-returning default.
Build a coordinate function: (coord data-x data-y) -> [pixel-x pixel-y].
Build a coordinate function: (coord data-x data-y) -> [pixel-x pixel-y].
Build a column-wise coordinate function: (coord xs ys) -> [pxs pys], over readers rather than one point at a time. The results are lazy readers, so nothing is allocated until they are read or realized.
Build a column-wise coordinate function: (coord xs ys) -> [pxs pys], over readers rather than one point at a time. The results are lazy readers, so nothing is allocated until they are read or realized.
Build a pixel-space reprojection function for coordinate systems that need arc interpolation (e.g. polar). Returns nil for systems where bars can be drawn as simple rectangles.
Build a pixel-space reprojection function for coordinate systems that need arc interpolation (e.g. polar). Returns nil for systems where bars can be drawn as simple rectangles.
Build the inverse of make-coord: (inverse panel-x panel-y) -> [data-x
data-y], where the pixel arguments are relative to the panel box's own
origin. Returns nil for a coordinate system with no coordinate-by-
coordinate inverse.
Interaction reads this direction: a brush reporting a data range, a crosshair reading an axis, a hit test.
Build the inverse of `make-coord`: (inverse panel-x panel-y) -> [data-x data-y], where the pixel arguments are relative to the panel box's own origin. Returns nil for a coordinate system with no coordinate-by- coordinate inverse. Interaction reads this direction: a brush reporting a data range, a crosshair reading an axis, a hit test.
The column-wise inverse: (inverse pxs pys) -> [xs ys]. Returns nil for
a coordinate system with no coordinate-by-coordinate inverse, matching
make-inverse.
x-type and y-type are the datatypes the two axes answer in, which
the caller knows from their scales: :float64 for a continuous axis,
:object for a band scale, whose inverse is the category holding the
position, or nil outside every band. Reading a continuous axis back
through an object column would box every value.
The column-wise inverse: (inverse pxs pys) -> [xs ys]. Returns nil for a coordinate system with no coordinate-by-coordinate inverse, matching `make-inverse`. `x-type` and `y-type` are the datatypes the two axes answer in, which the caller knows from their scales: `:float64` for a continuous axis, `:object` for a band scale, whose inverse is the category holding the position, or nil outside every band. Reading a continuous axis back through an object column would box every value.
Whether to show tick labels for this coordinate system.
Whether to show tick labels for this coordinate system.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |