title: R and ggplot2 : plot with factors on both axis
body: <p>My data frame looks like this :</p>
  
  <pre><code>data
  &gt;
            | Segment 1 | Segment 2  | Segment 3
  Segment 1 | 0.6861964 | 0.16669839 | 0.14710523
  Segment 2 | 0.2211293 | 0.69263231 | 0.08623838
  Segment 3 | 0.2595055 | 0.05354549 | 0.68694899
  </code></pre>
  
  <p>I would like to use in both axis <code>Segment 1</code>, <code>Segment 2</code> and <code>Segment 3</code> and use the values inside the table as parameters to have points of different sizes.</p>
  
  <p>What I tried for the moment is to add a column Segments to the above data frame and did a <code>melt()</code> in order to obtain the following table:</p>
  
  <pre><code>data_melt &lt;- melt(data, id = "Segments")
  &gt;
    | Segments  | variable  | value
  1 | Segment 1 | Segment 1 | 0.68619638
  2 | Segment 2 | Segment 1 | 0.22112931
  3 | Segment 3 | Segment 1 | 0.25950552
  4 | Segment 1 | Segment 2 | 0.16669839
  5 | Segment 2 | Segment 2 | 0.69263231
  6 | Segment 3 | Segment 2 | 0.05354549
  </code></pre>
  
  <p>Then trying to plot it I am stuck and could not find a ressource solving my problem.</p>
  
  <pre><code>ggplot(test, aes(x = Segments, y = variable, size = value))
      geom_point()
  </code></pre>
  
  <p>It plots the axis but no point appears and I get the following message:</p>
  
  <pre><code>geom_point: na.rm = FALSE
  stat_identity: na.rm = FALSE
  position_identity 
  </code></pre>
  
  <p>I would like the output to look like this:
  <a href="https://i.stack.imgur.com/CqL7v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CqL7v.png" alt="enter image description here"></a></p>