Skip to content

Commit

Permalink
release v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis committed Oct 17, 2023
1 parent 4883455 commit 3ed1376
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [UNRELEASED]
## [v0.2.1](https://github.com/pnezis/tucan/tree/v0.2.1) (2023-10-17)

### Added

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ in which case you can call `Mix.install/2`:

```elixir
Mix.install([
{:tucan, "~> 0.2.0"},
{:tucan, "~> 0.2.1"},
{:kino_vega_lite, "~> 0.1.8"}
])
```
Expand All @@ -90,7 +90,7 @@ You can add the `:tucan` dependency to your `mix.exs`:
```elixir
def deps do
[
{:tucan, "~> 0.2.0"}
{:tucan, "~> 0.2.1"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Tucan.MixProject do
use Mix.Project

@version "0.2.0"
@version "0.2.1"
@scm_url "https://github.com/pnezis/tucan"

def project do
Expand Down
9 changes: 5 additions & 4 deletions notebooks/time_series_plots_in_tucan.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

tucan_version =
case System.get_env("TUCAN_DEV") do
nil -> "0.2.0"
nil -> "~> 0.2.1"
_other -> [path: Path.expand("..", __DIR__)]
end

Mix.install([
{:tucan, tucan_version},
{:kino_vega_lite, "~> 0.1.9"}
{:kino_vega_lite, "~> 0.1.10"}
])

alias VegaLite, as: Vl
Expand Down Expand Up @@ -215,15 +215,16 @@ Tucan.Scale.set_color_scheme(heatmap, :redyellowblue, reverse: true)

### Adding in heatmap cells the labels

You can add annotations by setting the `:annotate` option to `true`. This will add a `:text` encoding to the plot which you can configure like all other encodings through the `:text` option.
You can add annotations by setting the `:annotate` option to `true`. This will add a `:text` encoding to the plot which you can configure like all other encodings through the `:text` option. You can also conditionally color the text using `:text_color`

```elixir
Tucan.heatmap(:weather, "date", "date", "temp_max",
annotate: true,
x: [time_unit: :date],
y: [time_unit: :month],
color: [aggregate: :mean],
text: [format: ".1f"]
text: [format: ".1f"],
text_color: [{nil, 9, "white"}, {25, nil, "white"}]
)
|> Tucan.set_title("Heatmap of Avg Max Temperatures in Seattle (2012-2015)")
|> Tucan.Axes.set_x_title("Day")
Expand Down

0 comments on commit 3ed1376

Please sign in to comment.