title: Line plot in R with ggplot and melt function: multiple lines in 5 categories
body: <p>I am really new to R and RStudio (and to this forum). I did a lot of research on my problem (also in this forum), but I still have problems to get the correct code. I am quite close, but it starts to be very frustrating.</p>
  
  <p>Situation: I have to do a REE pattern. X Axis are elements, Y-values are the concentration of the elements. Each sample is shown as a line from first to last element (x-axis). So it's a multiple line plot.
  My dataframe looks like this: 
  <a href="https://i.stack.imgur.com/QK0BN.png" rel="nofollow noreferrer">Dataframe</a></p>
  
  <pre><code>Element PA      PJ          PA          VA          VJ          PA          PA          PA          R
  Cs  8.393644832 9.274061495 8.466114498 124.8302919 14.17884799 24.29026324 16.62652167 136.5543529 15.7077603
  Rb  66.08861281 74.96446056 66.4222049  80.31878486 113.7845646 104.5795331 91.41634436 202.6518905 93.96286011
  Ba  162.7360691 196.7689123 132.1882321 87.87655638 108.7807453 64.40911125 56.2519533  34.28604744 77.26184806
  Th  69.50420273 10.69239264 60.48609257 10.7117353  61.83547442 79.0044607  97.33558025 92.98479452 58.67343532
  U   22.17827063 16.22661665 21.03802793 7.427212489 60.72442183 63.23055432 70.64986596 51.39206236 42.45965964
  Nb  7.575924774 5.89169239  6.667024084 5.004676505 16.69613523 16.67449315 13.346969   43.34980892 13.17651141
  Ta  10.71199686 10.60149917 7.779458029 6.835789229 15.94188008 20.1485504  15.27092298 31.27845584 17.07176294
  K   233.8150547 271.8452141 241.561939  266.9153787 251.42161   239.4491524 213.3914505 423.9658521 251.42161
  La  85.781713   16.03251185 67.342503   20.17716423 28.44896832 56.02416655 86.39273611 27.73347387 43.5324784
  Ce  65.93594156 11.79019617 47.55025458 17.54266241 25.52628696 49.26589625 57.6574228  12.21647606 34.22346809
  Pb  5.673083989 10.26288212 4.169977919 59.04878053 53.42872487 62.81513974 48.16121863 93.96287593 101.9287591
  Pr  53.02764512 9.938334989 42.03809952 14.99962348 17.24082014 37.33542354 53.81996734 25.90256871 28.40450355
  Nd  42.33110774 8.364811267 33.97954887 13.48174221 13.93479643 29.74581887 43.06564505 26.65600445 23.33544314
  Sr  0.835397313 0.815930916 0.586568694 9.996068224 0.960554876 0.536331654 0.258305773 5.683560546 0.942533523
  Sm  21.35644343 5.451089335 16.96532562 9.760893837 9.675593776 20.01885453 24.97813208 27.39269895 16.0149219
  Hf  44.23389487 52.43907046 42.33828695 4.98724425  30.28451128 49.09584912 60.28147686 9.971733073 24.74464941
  Zr  53.96191223 65.62184274 53.86924455 5.318772828 26.1413139  53.09855665 65.71920565 9.34974258  26.87927243
  Ti  1.436464088 1.215469613 1.270718232 10.66298343 0.497237569 0.662983425 0.662983425 5.524861878 0.607734807
  Eu  10.35812973 4.071632021 8.46110334  8.611540363 2.338303868 8.328014705 9.786671125 16.16876122 7.070426445
  Gd  14.83675531 4.409737144 11.44401365 7.645177015 8.221991883 15.42873831 18.54842542 27.21876767 12.99376358
  Tb  9.092304297 3.898598538 6.982306648 6.673348685 8.230478353 14.87434634 15.41911057 32.14506684 12.56736368
  Dy  6.38743838  3.392714189 4.532800141 5.210803147 7.695892687 12.39499316 12.92923541 31.99972441 11.63756207
  Ho  4.466797664 3.082328768 3.346515335 4.589583127 7.111016931 11.57170602 10.63770512 32.956692   11.03232412
  Y   3.35940512  2.382622411 2.505043001 5.01436475  6.489644503 8.926279165 8.788977547 37.04567217 10.68214568
  Er  4.715669314 3.488584654 3.470548704 4.488104792 7.032818937 11.60405599 10.95403677 34.6355416  11.22917717
  Tm  4.269381986 3.989071741 3.178992509 3.900228104 6.798645341 11.83388929 10.19664082 33.36983427 10.85995832
  Yb  5.223135226 4.959299109 3.870356399 3.60128161  6.859780617 11.56204692 10.80225244 32.97149663 10.56174395
  Lu  7.20048667  6.451947335 4.9601101   3.949574922 6.395672788 11.91831865 11.2065581  31.70363964 9.943874048
  </code></pre>
  
  <p>I want to have the x-axis with the elements in this specific order as shown in the dataframe column1 (as done with the levels=unique option). And for the y-values I want 5 categories (PA, PJ, VA, VJ, R) each with a specific colour. All columns should be plotted as lines. Important: each sample (column) should be one line and plotted. The legend should be simple and only show: colour = category. But thats not so necessary, I can also do the legend manualy at the end with a graphic editing programm. So thats not the main problem.</p>
  
  <p>My result so far: </p>
  
  <pre><code>require(ggplot2)
  require(reshape2) 
  df &lt;- read.csv2("ultra_REE_ref.csv", header = T, sep = ";", dec = ".")   
  df &lt;- melt(df ,  id.vars = 'Element', variable.name = "series")
  df$Element &lt;- factor(df$Element, levels=unique(df$Element)) 
  ggplot(df,aes(Element,value, col=series)) + geom_point() +
         theme(legend.position="none") + scale_y_log10()
  </code></pre>
  
  <p>which produces this picture:
  <a href="https://i.stack.imgur.com/zKlwM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zKlwM.jpg" alt="enter image description here"></a></p>
  
  <p>Does anyone has an idea how to</p>
  
  <p>1.make lines instead of points? I had lines once, but I can't reproduce it since I manipulated the alphabetical order of the x-axis. When i change the code to geom_line() it will give no output at all.</p>
  
  <ol start="2">
  <li><p>remove the points on the bottom at y = 0? I already removed all zeros from the input file (at least I think I did it properly). </p></li>
  <li><p>define each category with distinct colour? I would also be happy when I make 5 different input files and define the style for any file itself. Like plotting the lines into an existing plot. This would also be quite cool. </p></li>
  <li>making a empty background without any lines/shades.</li>
  </ol>
  
  <p>I would be so happy if someone could help me doing this. Thank you so much for reading so far :) Greetings!</p>