class_docstr: Graph super class containing generic common functions
class_docstr_tok: ["Graph","super","class","containing","generic","common","functions"]
docstr: Make the y axis: labels and guides
code: def _y_axis(self):
      """Make the y axis: labels and guides"""
      if not self._y_labels or not self.show_y_labels:
          return
  
      axis = self.svg.node(
          self.nodes["plot"],
          class_="axis y%s"
          % (" always_show" if self.show_y_guides else ""),
      )
  
      if (
          0 not in [label[1] for label in self._y_labels]
          and self.show_y_guides
      ):
          self.svg.node(
              axis,
              "path",
              d="M%f %f h%f"
              % (
                  0,
                  0 if self.inverse_y_axis else self.view.height,
                  self.view.width,
              ),
              class_="line",
          )
  
      for label, position in self._y_labels:
          if self.horizontal:
              major = label in self._y_labels_major
          else:
              major = position in self._y_labels_major
  
          if not (self.show_minor_y_labels or major):
              continue
          guides = self.svg.node(
              axis,
              class_="%sguides"
              % ("logarithmic " if self.logarithmic else ""),
          )
          x = -5
          y = self.view.y(position)
          if not y:
              continue
          if self.show_y_guides:
              self.svg.node(
                  guides,
                  "path",
                  d="M%f %f h%f" % (0, y, self.view.width),
                  class_="%s%s%sline"
                  % (
                      "axis " if label == "0" else "",
                      "major " if major else "",
                      "guide " if position != 0 else "",
                  ),
              )
          text = self.svg.node(
              guides,
              "text",
              x=x,
              y=y + 0.35 * self.style.label_font_size,
              class_="major" if major else "",
          )
  
          text.text = label
  
          if self.y_label_rotation:
              text.attrib["transform"] = "rotate(%d %f %f)" % (
                  self.y_label_rotation,
                  x,
                  y,
              )
              if 90 < self.y_label_rotation < 270:
                  text.attrib["class"] = " ".join(
                      (
                          text.attrib["class"]
                          and text.attrib["class"].split(" ")
                          or []
                      )
                      + ["backwards"]
                  )
          self.svg.node(
              guides,
              "title",
          ).text = self._y_format(position)
  
      if self._y_2nd_labels:
          secondary_ax = self.svg.node(
              self.nodes["plot"], class_="axis y2"
          )
          for label, position in self._y_2nd_labels:
              major = position in self._y_labels_major
              if not (self.show_minor_y_labels or major):
                  continue
              # it is needed, to have the same structure as primary axis
              guides = self.svg.node(secondary_ax, class_="guides")
              x = self.view.width + 5
              y = self.view.y(position)
              text = self.svg.node(
                  guides,
                  "text",
                  x=x,
                  y=y + 0.35 * self.style.label_font_size,
                  class_="major" if major else "",
              )
              text.text = label
              if self.y_label_rotation:
                  text.attrib["transform"] = "rotate(%d %f %f)" % (
                      self.y_label_rotation,
                      x,
                      y,
                  )
                  if 90 < self.y_label_rotation < 270:
                      text.attrib["class"] = " ".join(
                          (
                              text.attrib["class"]
                              and text.attrib["class"].split(" ")
                              or []
                          )
                          + ["backwards"]
                      )
  
imports: from math import ceil, cos, sin, sqrt
  from pygal import stats
  from pygal._compat import is_list_like
  from pygal.graph.public import PublicApi
  from pygal.interpolate import INTERPOLATIONS
  from pygal.util import cached_property, compute_scale, cut, decorate, filter_kwargs, get_text_box, get_texts_box, majorize, rad, reverse_text_len, split_title, truncate
  from pygal.view import LogView, ReverseView, View, XYLogView
label_desc: Use image node_id 6 for calling the Graph obj's underlying member method code with example usage: obj._y_axis() without return types