Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5894
| From | leigh pascoe <leigh@evry.inserm.fr> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Plot with ordinate values summed |
| Date | 2011-10-26 21:47 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j89v65$s8$1@smc.vnet.net> (permalink) |
Dear Mathgroup,
Can someone please help me with the following display problem. I have
data of the form
data={{{x1,y1}, {x1,y2}, {x2,y2}.....{xn,yn}}{xx,yy},{},........}}}
or a list of lists of {x,y} coordinates. I want to plot each set
separately, which I have done with the following inelegant commands:
fil1=Import[...//file1];
fil2=Import[.. //file2]; etc
filelist = {"fil1", "fil2", "fil3", f "il4", "fil5", "fil6", "fil7",
"fil8", "fil9", "fil10", "fil11", "fil12", "fil13", "fil14",
"fil15", "fil16", "fil17", "fil18", "fil19", "fil20", "fil21",
"fil22"}
elementlist = {fil1[[All, {3, 5}]], fil2[[All, {3, 5}]],
fil3[[All, {3, 5}]], fil4[[All, {3, 5}]], fil5[[All, {3, 5}]],
fil6[[All, {3, 5}]], fil7[[All, {3, 5}]], fil8[[All, {3, 5}]],
fil9[[All, {3, 5}]], fil10[[All, {3, 5}]], fil11[[All, {3, 5}]],
fil12[[All, {3, 5}]], fil13[[All, {3, 5}]], fil14[[All, {3, 5}]],
fil15[[All, {3, 5}]], fil16[[All, {3, 5}]], fil17[[All, {3, 5}]],
fil18[[All, {3, 5}]], fil19[[All, {3, 5}]], fil20[[All, {3, 5}]],
fil21[[All, {3, 5}]], fil22[[All, {3, 5}]]};
i.e. taking data from columns 3 and 5 to get my {x,y} data.
ListPlot[#, Filling -> Axis, AxesLabel -> {"theta", "lod"}] & /@ elementlist
Then gives me a plot for each file with labeled Axes.
I would also like to plot data corresponding to the sums of the y values
where the x value is repeated, so
{{x1,y1},{x1,y2},{x1,y3}} in a given file should become {x1,y1+y2+y3}
and the mean of the y values i.e. {x1, (y1+y2+y3)/3} etc
Finally it would be nice to have a title for each plot corresponding to
the file name or other list of titles. I can't quite seem to get this to
work. I would appreciate any help.
Thanks
LP
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Plot with ordinate values summed leigh pascoe <leigh@evry.inserm.fr> - 2011-10-26 21:47 +0000
csiph-web