../examples/simple_pairs.py
Sequence row data, such as is returned by csv.reader
can be accessed by specifying the indices of the columns containing the x
and y
values.
Note that leather does not automatically convert numerical strings, such as those stored in a CSV. If you want that you'll need to use a smarter table reader, such as agate
../examples/csv_reader.py
Dict row data, such as is returned by csv.DictReader
can be accessed by specifying the indices of the columns containing the x
and y
values.
See previous example for note on strings from CSVs.
../examples/csv_dict_reader.py
Completely custom data formats are also supported via accessor functions.
../examples/custom_data.py
Multiple data series can be displayed on a single chart so long as they all use the same type of .Scale
.
../examples/multiple_series.py
../examples/bars.py
../examples/columns.py
../examples/dots.py
../examples/lines.py
You can mix different shapes for different series on the same chart.
../examples/mixed_shapes.py
When using numerical data .Linear
scales are created automatically and by default. You may override the domain by adding a scale manually.
../examples/linear.py
When using text data .Ordinal
scales are created automatically and by default. It is generally not useful to override these defaults.
../examples/ordinal.py
When using date/time data .Temporal
scales are created automatically and by default. You may override the domain by adding a scale manually.
../examples/temporal.py
You can change the list of ticks that are displayed using .Chart.add_x_axis
and .Chart.add_y_axis
methods. This will not adjust automatically adjust the scale, so it is possible to pick tick values that are not displayed.
../examples/ticks.py
You can provide a tick formatter method to change how ticks are displayed using the .Chart.add_x_axis
and .Chart.add_y_axis
methods.
../examples/tick_format.py
Chart styles are set using a dead simple .theme
system. Leather is meant for making quick and dirty charts. It is neither expected nor recommended for user's to customize these styles.
../examples/theme.py
More practically, individual default .Series
colors can be overridden when they are created.
../examples/series_color.py
Style attributes of individual data points can be set by value using a .style_function
.
../examples/colorized_dots.py
You can add charts of completely different types to a single graphic by using .Grid
.
../examples/grid.py
A grid of charts can automatically be synchronized to a consistent view using .Lattice
.
../examples/lattice.py