Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
rmsdata= Partition[ReadList["RMStabledata.txt", Number],29]  
{{0, 2.96142, 36.7357, 9.05539, 9, 0, 0, 1, 1, 0, 2, -1, 1, -2, 2, -4,
 2, -3, 1, -5, 1, -7, 1, -6, 0, -7, -1, -9, -1}, {1, 2.68942, 
30.2974, 8.24621, 8, 0, 0, -2, 0, -4, 0, -5, 1, -7, 1, -6, 2, -8, 
2, -9, 1, -10, 0, -8, 0, -7, -1, -8, -2}, {2, 3.04704, 38.8905, 10.,
5, 0, 0, 1, 1, -1, 1, -2, 2, -4, 2, -3, 3, -2, 4, -3, 5, -5, 5, -6,
6, -7, 7, -6, 8}, {3, 2.0943, 18.3723, 4.24264, 14, 0, 0, 1, -1, 
0, -2, -2, -2, -1, -1, -2, 0, -1, 1, 1, 1, 0, 2, -1, 3, -2, 4, -3, 
3}, {4, 2.97999, 37.1979, 10., 9, 0, 0, 2, 0, 4, 0, 3, 1, 5, 1, 4, 
2, 5, 3, 7, 3, 8, 4, 9, 5, 7, 5, 8, 6}, {5, 2.48083, 25.7801, 
7.61577, 7, 0, 0, 2, 0, 4, 0, 3, 1, 2, 2, 0, 2, 1, 3, 2, 4, 4, 4, 6,
4, 5, 3, 7, 3}}  
sortedrmsdata = SortBy[rmsdata, #[[5]] &]  

xydata = Partition[Flatten[Take[sortedrmsdata, All, {6, 29}]], 2]  

gridedvalues = Take[sortedrmsdata, All, {1, 5}]  

col = {SpanFromBelow, SpanFromBelow, SpanFromBelow, SpanFromBelow, 
   SpanFromBelow, SpanFromBelow};  

Table[AppendTo[gridedvalues[[i]], col[[i]]], {i, 6}]  grided = Prepend[
  gridedvalues, {"Number", "RMS displacement", "Volume", 
   "RMS end-end", "Interactions", "Graph"}]  

Grid[AppendTo[
  grided, {SpanFromAbove, SpanFromAbove, SpanFromAbove, SpanFromAbove,
    SpanFromAbove, 
   ListPlot[Partition[xydata, 12], Mesh -> All, 
    MeshStyle -> PointSize[Large], Joined -> True, 
    PlotLegend -> Take[sortedrmsdata, All, 1]]}], Frame -> All]

Worked:

col ={ListPlot[Partition[xydata, 12], Mesh -> All, 
MeshStyle -> PointSize[Large], Joined -> True], SpanFromAbove, SpanFromAbove, SpanFromAbove, SpanFromAbove, SpanFromAbove};
gridedvalues = Take[sortedrmsdata, All, {1, 5}];Table[AppendTo[gridedvalues[[i]], col[[i]]], {i, 6}];
grided = Prepend[gridedvalues, {"Number", "RMS displacement", "Volume", "RMS end-end", "Interactions", "Graph"}];
Grid[grided, Alignment -> Center, Frame -> All]
share|improve this question
    
Right now this outputs a grid with 6 columns but instead of the graph being positioned in the entire last column it is in the bottom corner. –  MCF Aug 2 '13 at 17:52
    
I want the graph to be the last column where it reads Graph not the row. I tried posting a picture but I dont have enough reputation.Thank you –  MCF Aug 2 '13 at 18:10
    
Also, I only have 6 columns the last one that you show isnt showing on mine –  MCF Aug 2 '13 at 18:13
    
u have 7 columns and rmsdata=data i believe –  Rorschach Aug 2 '13 at 18:17
    
@nasser you have to have 10 rep or more befire you can pist images. –  Sjoerd C. de Vries Aug 2 '13 at 18:18
show 1 more comment

1 Answer

up vote 0 down vote accepted

It might not be the complete solution,but I may be this way you can do it.

gridedvalues = Take[sortedrmsdata, All, {1, 6}];    (*not 5*)

I don't know what this SpanFromBelow means because it doesn't show up in documentation.But I have let it be there.

Table[AppendTo[gridedvalues[[i]], col[[i]]], {i, 6}]; 
grided = Prepend[
  gridedvalues, {"Number", "RMS displacement", "Volume", 
   "RMS end-end", "Interactions", "Graph"}]

Instead of adding it at end, append plot here, as under

AppendTo[gridedvalues, 
  ListPlot[Partition[xydata, 12], Mesh -> All, 
   MeshStyle -> PointSize[Large]]];
Grid[AppendTo[grided, gridedvalues], Alignment -> Right, Frame -> All]
share|improve this answer
1  
Not sure why but this didnt quite work for me but led me in the right direction. I edited my question with what worked for me. Thank you for your help. –  MCF Aug 2 '13 at 19:49
    
I am glad, I could help :) –  Rorschach Aug 2 '13 at 19:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.