class_docstr: List of scales
  
  This class has methods the simplify the handling of
  the ggplot object scales
class_docstr_tok: ["List","of","scales","This","class","has","methods","the","simplify","the","handling","of","the","ggplot","object","scales"]
docstr: Return the scale for the aesthetic or None if there isn't one
  
  These are the scales specified by the user e.g
      `ggplot() + scale_x_continuous()`
  or those added by default during the plot building
  process
docstr_tok: ["Return","the","scale","for","the","aesthetic","or","None","if","there","is","n't","one","These","are","the","scales","specified","by","the","user","e.g","`","ggplot","(",")","+","scale_x_continuous","(",")","`","or","those","added","by","default","during","the","plot","building","process"]
code: def get_scales(
      self, aesthetic: ScaledAestheticsName | str
  ) -> Scale | None:
      """
      Return the scale for the aesthetic or None if there isn't one
  
      These are the scales specified by the user e.g
          `ggplot() + scale_x_continuous()`
      or those added by default during the plot building
      process
      """
      bool_lst = self.find(aesthetic)
      try:
          idx = bool_lst.index(True)
          return self[idx]
      except ValueError:
          return None
  
imports: from __future__ import annotations
  import itertools
  import typing
  from contextlib import suppress
  from typing import List
  from warnings import warn
  import numpy
  import pandas.api.types
  from .._utils import array_kind
  from .._utils.registry import Registry
  from ..exceptions import PlotnineError, PlotnineWarning
  from ..mapping.aes import aes_to_scale
  from .scale import scale
label_desc: Use image node_id 4 for calling the Scales obj's underlying member method code with example usage: obj.get_scales(aesthetic) and returns: self, None