code: def get_yname(self, var, coords=None):
          
          if coords is not None:
              coord = self.get_variable_by_axis(var, 'y', coords)
              if coord is not None and coord.name in var.dims:
                  return coord.name
          dimlist = list(self.y.intersection(var.dims))
          if dimlist:
              if len(dimlist) > 1:
                  warn("Found multiple matches for y coordinate in the variable:"
                       "%s. I use %s" % (', '.join(dimlist), dimlist[0]),
                       PsyPlotRuntimeWarning)
              return dimlist[0]
          # otherwise we return the coordinate in the last or second last
          # position
          if self.is_unstructured(var):
              return var.dims[-1]
          return var.dims[-2 if var.ndim > 1 else -1]
docs: Get the name of the y-dimension
  
          This method gives the name of the y-dimension (which is not necessarily
          the name of the coordinate if the variable has a coordinate attribute)
  
          Parameters
          ----------
          var: xarray.Variables
              The variable to get the dimension for
          coords: dict
              The coordinates to use for checking the axis attribute. If None,
              they are not used
  
          Returns
          -------
          str
              The coordinate name
  
          See Also
          --------
          get_y