ListPlot from Table of single input x and many y(x) output
$begingroup$
Suppose have data for several x and several y(x), for example
mydata = {{11, 1.1, 2.3, 2.4}, {12, 1.3, 1.4, 1.9}, {13, 1.8, 1.7, 1.2}}
mydata // MatrixForm
So
for x=11, have y(x)= 1.1, 2.3 and 2.4
for x=12, have y(x)= 1.3, 1.4 and 1.9
for x=13, have y(x)= 1.8, 1.7 and 1.2
How to do list plot for many y(x) as function of x?
Use of
ListPlot[mydata]
is no working.
plotting list-manipulation table
$endgroup$
add a comment |
$begingroup$
Suppose have data for several x and several y(x), for example
mydata = {{11, 1.1, 2.3, 2.4}, {12, 1.3, 1.4, 1.9}, {13, 1.8, 1.7, 1.2}}
mydata // MatrixForm
So
for x=11, have y(x)= 1.1, 2.3 and 2.4
for x=12, have y(x)= 1.3, 1.4 and 1.9
for x=13, have y(x)= 1.8, 1.7 and 1.2
How to do list plot for many y(x) as function of x?
Use of
ListPlot[mydata]
is no working.
plotting list-manipulation table
$endgroup$
1
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38
add a comment |
$begingroup$
Suppose have data for several x and several y(x), for example
mydata = {{11, 1.1, 2.3, 2.4}, {12, 1.3, 1.4, 1.9}, {13, 1.8, 1.7, 1.2}}
mydata // MatrixForm
So
for x=11, have y(x)= 1.1, 2.3 and 2.4
for x=12, have y(x)= 1.3, 1.4 and 1.9
for x=13, have y(x)= 1.8, 1.7 and 1.2
How to do list plot for many y(x) as function of x?
Use of
ListPlot[mydata]
is no working.
plotting list-manipulation table
$endgroup$
Suppose have data for several x and several y(x), for example
mydata = {{11, 1.1, 2.3, 2.4}, {12, 1.3, 1.4, 1.9}, {13, 1.8, 1.7, 1.2}}
mydata // MatrixForm
So
for x=11, have y(x)= 1.1, 2.3 and 2.4
for x=12, have y(x)= 1.3, 1.4 and 1.9
for x=13, have y(x)= 1.8, 1.7 and 1.2
How to do list plot for many y(x) as function of x?
Use of
ListPlot[mydata]
is no working.
plotting list-manipulation table
plotting list-manipulation table
edited Jan 11 at 14:48
Nigel1
asked Jan 11 at 11:57
Nigel1Nigel1
1976
1976
1
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38
add a comment |
1
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38
1
1
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
mydata2 = Thread[{First@#, Rest@#}] & /@ mydata;
ListPlot[mydata2]
$endgroup$
add a comment |
$begingroup$
mydata2 = Map[(mydata[[All, {1, #}]]) &, Range[2, Last@Dimensions@mydata]];
ListPlot[mydata2, Joined -> True]
$endgroup$
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
add a comment |
$begingroup$
Not applicable to all data, but in this case DataRange
appears useful:
ListLinePlot[mydata[Transpose][[2 ;;]], DataRange -> {11, 13}]
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189282%2flistplot-from-table-of-single-input-x-and-many-yx-output%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
mydata2 = Thread[{First@#, Rest@#}] & /@ mydata;
ListPlot[mydata2]
$endgroup$
add a comment |
$begingroup$
mydata2 = Thread[{First@#, Rest@#}] & /@ mydata;
ListPlot[mydata2]
$endgroup$
add a comment |
$begingroup$
mydata2 = Thread[{First@#, Rest@#}] & /@ mydata;
ListPlot[mydata2]
$endgroup$
mydata2 = Thread[{First@#, Rest@#}] & /@ mydata;
ListPlot[mydata2]
answered Jan 11 at 12:00
kglrkglr
182k10200415
182k10200415
add a comment |
add a comment |
$begingroup$
mydata2 = Map[(mydata[[All, {1, #}]]) &, Range[2, Last@Dimensions@mydata]];
ListPlot[mydata2, Joined -> True]
$endgroup$
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
add a comment |
$begingroup$
mydata2 = Map[(mydata[[All, {1, #}]]) &, Range[2, Last@Dimensions@mydata]];
ListPlot[mydata2, Joined -> True]
$endgroup$
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
add a comment |
$begingroup$
mydata2 = Map[(mydata[[All, {1, #}]]) &, Range[2, Last@Dimensions@mydata]];
ListPlot[mydata2, Joined -> True]
$endgroup$
mydata2 = Map[(mydata[[All, {1, #}]]) &, Range[2, Last@Dimensions@mydata]];
ListPlot[mydata2, Joined -> True]
answered Jan 11 at 12:08
RMMARMMA
1,41011230
1,41011230
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
add a comment |
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
2
2
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
$begingroup$
Notice how your image is very similar to Mr.Wizard's image. Still, you image somehow appears to be of lower visual quality; it looks 'fuzzy' or something. Why is that? Well, this is because you saved it as a JPG image. JPG works well with photographic images, but introduces artefacts in illustrations, diagrams, screenshots, etc. For this kind of images, PNG is the ideal choice! :)
$endgroup$
– Andreas Rejbrand
Jan 11 at 13:11
add a comment |
$begingroup$
Not applicable to all data, but in this case DataRange
appears useful:
ListLinePlot[mydata[Transpose][[2 ;;]], DataRange -> {11, 13}]
$endgroup$
add a comment |
$begingroup$
Not applicable to all data, but in this case DataRange
appears useful:
ListLinePlot[mydata[Transpose][[2 ;;]], DataRange -> {11, 13}]
$endgroup$
add a comment |
$begingroup$
Not applicable to all data, but in this case DataRange
appears useful:
ListLinePlot[mydata[Transpose][[2 ;;]], DataRange -> {11, 13}]
$endgroup$
Not applicable to all data, but in this case DataRange
appears useful:
ListLinePlot[mydata[Transpose][[2 ;;]], DataRange -> {11, 13}]
answered Jan 11 at 12:46
Mr.Wizard♦Mr.Wizard
231k294761046
231k294761046
add a comment |
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f189282%2flistplot-from-table-of-single-input-x-and-many-yx-output%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Related: (21884), (47038)
$endgroup$
– Mr.Wizard♦
Jan 11 at 12:38