title: How do I jitter the node split strings in plotting ctree output from partykit?
body: <p>I have an issue where I am using mainly categorical data, set to a class of factor, in a classification tree. I am using the <code>partykit</code> package in R and not <code>party</code> as previous answers here suggested that the former package is better for manipulation of graphics output.</p>
  
  <p>I do not have many nodes (about 7) in my real dataset, but I have quite a few factor levels for some variables and I am encountering the issue that the factor levels on the left side of the split and those from the right side are interfering with each other. Specifically, this occurs because of the horizontal orientation of the factor level lists in combination with the length of the factor levels.</p>
  
  <p>I can reproduce the issue using the Aids2 dataset in the <code>MASS</code> package. This is a nonsense example, but it generates the behaviour I wish to solve</p>
  
  <pre><code>library("partykit")
  SexTest &lt;- ctree(sex ~ ., data=Aids2)
  plot(SexTest)
  </code></pre>
  
  <p>If you look at the node split information for Node 1, you will see the behaviour I am describing:<img src="https://i.stack.imgur.com/YyWzN.jpg" alt=""> </p>
  
  <p>In my real data frame, shrinking the font only works if I get it down to 4-point, which is unreadable.</p>
  
  <p>Is there some way to define a text box for that string, and enable the text to wrap? I've looked through <code>par</code> and <code>gpar</code> trying to find a solution, but have been unsuccessful. Another option which would be suitable would be to stagger the vertical position of the factor information for each node, so that they are situated one under the other.</p>