code: def pca_variance_ratio(adata, n_pcs=30, log=False, show=None, save=None):
      
      ranking(adata, 'uns', 'variance_ratio', n_points=n_pcs, dictionary='pca', labels='PC', log=log)
      utils.savefig_or_show('pca_variance_ratio', show=show, save=save)
docs: Plot the variance ratio.
  
      Parameters
      ----------
      n_pcs : `int`, optional (default: `30`)
           Number of PCs to show.
      log : `bool`, optional (default: `False`)
           Plot on logarithmic scale..
      show : `bool`, optional (default: `None`)
           Show the plot, do not return axis.
      save : `bool` or `str`, optional (default: `None`)
          If `True` or a `str`, save the figure. A string is appended to the
          default filename. Infer the filetype if ending on {'.pdf', '.png', '.svg'}.