MCPcopy Create free account
hub / github.com/spotify/chartify / test_histogram

Method test_histogram

tests/test_plots.py:635–641  ·  view source on GitHub ↗

No groupings.

(self)

Source from the content-addressed store, hash-verified

633 self.data = pd.DataFrame({"values": [0, 4, 8, 22, 2, 2, 10], "dimension": ["a", "a", "a", "a", "b", "b", "b"]})
634
635 def test_histogram(self):
636 """No groupings."""
637 ch = chartify.Chart(y_axis_type="density")
638 ch.plot.histogram(self.data, "values", bins=2, method="count")
639 assert np.array_equal(chart_data(ch, "")["values"], [6, 1])
640 assert np.array_equal(chart_data(ch, "")["max_edge"], [11.0, 22.0])
641 assert np.array_equal(chart_data(ch, "")["min_edge"], [0.0, 11.0])
642
643 def test_grouped_histogram(self):
644 """Grouped histogram."""

Callers

nothing calls this directly

Calls 2

chart_dataFunction · 0.85
histogramMethod · 0.80

Tested by

no test coverage detected