title: how to plot categorical data?
body: <p>Basically data contains information about the <code>machine</code> being used by <code>operators</code> for specific <code>activity</code>  </p>
  
  <pre><code>df.head()
  </code></pre>
  
  <p>I have data like as follows: </p>
  
  <pre><code>machine_name                activity                      Operator_name     start_datetime       end_datetime   reasons_for_break   duration
  Yash [HMC]           PILLAR SUB ASSY MOUNTING ON BASE      Abhishek     2018-10-10 00:50:20 2018-10-10 11:51:23                       661
  IMPERIAL             SPINDLE MOTOR ASSEMBLY AND MOUNTING    Abijith     2018-10-10 11:44:00 2018-10-10 12:26:42                        42
  V.R                  SPINDLE MOTOR ASSEMBLY AND MOUNTING    Abijith     2018-10-10 11:21:02 2018-10-10 12:26:27                        65
  Gnutti Carlo-2[HMC]   ATC MOUNTING ON MACHINE BASE        Anantha Ramu  2018-10-10 00:54:59 2018-10-10 00:55:45                         0
  Gnutti Carlo-2[HMC]      SPINDLE MOUNTING                 Anantha Ramu  2018-10-10 00:57:04 2018-10-10 00:58:55    MFD mistake          1
  MMF-3[HMC]          APC SUB ASSY MOUNTING ON BASE            Ashok      2018-10-10 09:27:41 2018-10-10 12:04:31    APC UP DOWN         56
  MMF-3[HMC]              IT/DDRT MOUNTING ON BASE             Ashok      2018-10-10 13:45:16 2018-10-10 15:13:30                        88
  Gnutti Carlo-2[HMC] PILLAR SUB ASSY MOUNTING ON BASE       Balamurali   2018-10-10 09:17:04 2018-10-10 12:21:25                        184
  Gnutti Carlo-2[HMC] PILLAR SUB ASSY MOUNTING ON BASE       Balamurali   2018-10-10 12:21:25 2018-10-10 13:18:54    Tea break            57
  </code></pre>
  
  <p>the problem is all the columns are <code>categorical</code> datatype expect <code>start_datetime</code> &amp; <code>end_datetime</code> which are <code>datetime</code> format and <code>duration</code> is in <code>integer</code> datatype.</p>
  
  <p>How these data can be <code>plotted</code> showing all the information it have??</p>
  
  <p>I tried with seaborn as:</p>
  
  <pre><code>import seaborn as sns
  sns.lmplot( x="Operator_name", y="duration", data=df, fit_reg=False, hue='machine_name', legend=True)
  </code></pre>
  
  <p>but got error as :</p>
  
  <p><code>Categorical is not ordered for operation min</code></p>
  
  <p>How could I plot and show information of this data ??</p>
  
  <p>Tried below code :</p>
  
  <pre><code>sns.catplot(x = 'Operator_name' , y = 'duration', hue ='nick_name' , data = df)
  </code></pre>
  
  <p>Got a plot with overlapping x axis</p>
  
  <p><a href="https://i.stack.imgur.com/zZj6h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zZj6h.png" alt="x axis overlapping"></a></p>