class_docstr: Visual tests for the high-level drawing utilities
class_docstr_tok: ["Visual","tests","for","the","high-level","drawing","utilities"]
docstr: Test labels and ticks with horizontal barcharts
docstr_tok: ["Test","labels","and","ticks","with","horizontal","barcharts"]
code: def test_labels_horizontal(self):
      """
      Test labels and ticks with horizontal barcharts
      """
      labels = ["books", "cinema", "cooking", "gaming"]
      ticks = [
          "noun",
          "verb",
          "adverb",
          "pronoun",
          "preposition",
          "digit",
          "other",
      ]
      _, ax = plt.subplots()
  
      # Plots stacked bar charts
      bar_stack(
          self.data,
          labels=labels,
          ticks=ticks,
          orientation="h",
          colormap="cool",
      )
  
      # Extract tick labels from the plot
      ticks_ax = [tick.get_text() for tick in ax.yaxis.get_ticklabels()]
      # Assert that ticks are set properly
      assert ticks_ax == ticks
  
      # Assert image similarity
      self.assert_images_similar(ax=ax, tol=0.05)
  
file_path: yellowbrick/tests/test_draw.py
imports: import pytest
  import numpy
  import matplotlib.pyplot
  from yellowbrick.draw import *
  from .base import VisualTestCase
label_desc: Use image node_id 6 for calling the TestDraw obj's underlying member method code with example usage: obj.test_labels_horizontal() without return types