code: def _set_ticks_labels(ax, data, labels, positions, plot_opts):
      """Set ticks and labels on horizontal axis."""
  
      # Set xticks and limits.
      ax.set_xlim([np.min(positions) - 0.5, np.max(positions) + 0.5])
      ax.set_xticks(positions)
  
      label_fontsize = plot_opts.get("label_fontsize")
      label_rotation = plot_opts.get("label_rotation")
      if label_fontsize or label_rotation:
          from matplotlib.artist import setp
  
      if labels is not None:
          if not len(labels) == len(data):
              msg = "Length of `labels` should equal length of `data`."
              raise ValueError(msg)
  
          xticknames = ax.set_xticklabels(labels)
          if label_fontsize:
              setp(xticknames, fontsize=label_fontsize)
  
          if label_rotation:
              setp(xticknames, rotation=label_rotation)
  
      return
  
file_path: statsmodels/statsmodels/graphics/boxplots.py
imports: import numpy
  from scipy.stats import gaussian_kde
  from .None import utils
label_desc: Use image node_id 3 for calling a global function with example usage: _set_ticks_labels(ax, data, labels, positions, plot_opts) without return types