code: def test_factorplots(self):
      df = self.iris
  
      fg = df.sns.factorplot(df.columns[1])
      self.assertIsInstance(fg, sns.FacetGrid)
      self.assertEqual(fg.ax.get_xlabel(), ".target")
      self.assertEqual(fg.ax.get_ylabel(), df.columns[1])
      tm.close()
  
      fg = df.sns.factorplot(x=df.columns[1])
      self.assertIsInstance(fg, sns.FacetGrid)
      self.assertEqual(fg.ax.get_xlabel(), df.columns[1])
      self.assertEqual(fg.ax.get_ylabel(), ".target")
      tm.close()
  
      fg = df.sns.factorplot(x=df.columns[1], y=df.columns[2])
      self.assertIsInstance(fg, sns.FacetGrid)
      self.assertEqual(fg.ax.get_xlabel(), df.columns[1])
      self.assertEqual(fg.ax.get_ylabel(), df.columns[2])
  
imports: import pytest
  import matplotlib
  import numpy
  import sklearn.datasets
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 1 for calling the TestSeabornCategorical obj's underlying member method code with example usage: obj.test_factorplots() without return types