Skip to content

CellValues Source

Bases: Enum

Whether the cells of a HeatmapChart show their value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

cities = ndp.Array.from_list(["Paris", "Lyon", "Pau"])
january = ndp.Array.from_list([5.5, 3.0, 8.0])
february = ndp.Array.from_list([6.0, 4.5, 9.0])
march = ndp.Array.from_list([9.5, 8.0, 11.5])
temperatures = ndp.Table.from_arrays({"city": cities, "jan": january, "feb": february, "mar": march})
chart = ndp.HeatmapChart(columns=["jan", "feb", "mar"], labels="city", values=ndp.CellValues.SHOWN)
plot = ndp.Plot.heatmap(temperatures, chart)
plot.show()

Plot drawn by the example

Attributes

SHOWN = auto() Source

Each cell shows its value with at most two decimals, in black or white to stay readable.

Added in version 0.1.0

Examples:

import numdaplot as ndp

cities = ndp.Array.from_list(["Paris", "Lyon", "Pau"])
january = ndp.Array.from_list([5.5, 3.0, 8.0])
february = ndp.Array.from_list([6.0, 4.5, 9.0])
march = ndp.Array.from_list([9.5, 8.0, 11.5])
temperatures = ndp.Table.from_arrays({"city": cities, "jan": january, "feb": february, "mar": march})
chart = ndp.HeatmapChart(columns=["jan", "feb", "mar"], labels="city", values=ndp.CellValues.SHOWN)
plot = ndp.Plot.heatmap(temperatures, chart)
plot.show()

Plot drawn by the example

HIDDEN = auto() Source

The cells only show their color. Default value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

cities = ndp.Array.from_list(["Paris", "Lyon", "Pau"])
january = ndp.Array.from_list([5.5, 3.0, 8.0])
february = ndp.Array.from_list([6.0, 4.5, 9.0])
march = ndp.Array.from_list([9.5, 8.0, 11.5])
temperatures = ndp.Table.from_arrays({"city": cities, "jan": january, "feb": february, "mar": march})
chart = ndp.HeatmapChart(columns=["jan", "feb", "mar"], labels="city", values=ndp.CellValues.HIDDEN)
plot = ndp.Plot.heatmap(temperatures, chart)
plot.show()

Plot drawn by the example