VISUALISE bill_len AS p, bill_dep AS q FROM ggsql:penguins
DRAW point
PROJECT p, q TO cartesianCartesian
The Cartesian coordinate system is the most well-known and the default for ggsql. It maps the primary positional aesthetic along a horizontal axis and the secondary along a perpendicular vertical axis.
Default aesthetics
The Cartesian coordinate system has the following default positional aesthetics which will be used if no others have been provided:
- Primary:
x(horizontal position) - Secondary:
y(vertical position)
Users can provide their own aesthetic names if needed, e.g.
PROJECT p, q TO cartesianassuming they do not try to use a name that is already being used by any facet or non-positional aesthetics (e.g. PROJECT fill, panel TO cartesian is not allowed).
Settings
clip: Should data be removed if it appears outside the bounds of the coordinate system. Defaults totrueratio: The aspect ratio between the steps on the vertical and horizontal axis. Defaults tonull(no enforced aspect ratio)
Examples
Use custom positional aesthetic names
Flip the x and y axes
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
DRAW point
PROJECT y, x TO cartesian