Widening the x-axis by a specific factor?












0















I am trying to plot data in a simple scatter plot.



I am able to this pretty well with the data I have, the only issue is that, as a result of the experiment I was running, the x-axis is actually off.



The x-axis is the position of an object and it is crucial for my work to point out the distance at certain points. However, the data I have is not scaled correctly.



As an example, one relevant distance is 0.02 mm on the plot but I want it to be 0.38 mm (because this is the value it actually was in the experiment).



Is there a way to scale the x-axis so that it accurately portrays the projected distance while keeping all y-values the same (the y-axis is fine)?



I know the value by which I need to multiply the distances in the plot to get the correct distance (roughly 19) but how can I change the x-axis in the plot so that this information is readily there for the viewer?



I guess in a way I want to widen the x-axis by a factor? Is this possible?










share|improve this question























  • Why not simply correct the data before plotting it?

    – Davis Herring
    Jan 1 at 22:13











  • I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

    – Stephanie Mendez
    Jan 1 at 22:15











  • I don’t mean correct it in the past—I mean rescale it when making the plot.

    – Davis Herring
    Jan 1 at 22:17
















0















I am trying to plot data in a simple scatter plot.



I am able to this pretty well with the data I have, the only issue is that, as a result of the experiment I was running, the x-axis is actually off.



The x-axis is the position of an object and it is crucial for my work to point out the distance at certain points. However, the data I have is not scaled correctly.



As an example, one relevant distance is 0.02 mm on the plot but I want it to be 0.38 mm (because this is the value it actually was in the experiment).



Is there a way to scale the x-axis so that it accurately portrays the projected distance while keeping all y-values the same (the y-axis is fine)?



I know the value by which I need to multiply the distances in the plot to get the correct distance (roughly 19) but how can I change the x-axis in the plot so that this information is readily there for the viewer?



I guess in a way I want to widen the x-axis by a factor? Is this possible?










share|improve this question























  • Why not simply correct the data before plotting it?

    – Davis Herring
    Jan 1 at 22:13











  • I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

    – Stephanie Mendez
    Jan 1 at 22:15











  • I don’t mean correct it in the past—I mean rescale it when making the plot.

    – Davis Herring
    Jan 1 at 22:17














0












0








0








I am trying to plot data in a simple scatter plot.



I am able to this pretty well with the data I have, the only issue is that, as a result of the experiment I was running, the x-axis is actually off.



The x-axis is the position of an object and it is crucial for my work to point out the distance at certain points. However, the data I have is not scaled correctly.



As an example, one relevant distance is 0.02 mm on the plot but I want it to be 0.38 mm (because this is the value it actually was in the experiment).



Is there a way to scale the x-axis so that it accurately portrays the projected distance while keeping all y-values the same (the y-axis is fine)?



I know the value by which I need to multiply the distances in the plot to get the correct distance (roughly 19) but how can I change the x-axis in the plot so that this information is readily there for the viewer?



I guess in a way I want to widen the x-axis by a factor? Is this possible?










share|improve this question














I am trying to plot data in a simple scatter plot.



I am able to this pretty well with the data I have, the only issue is that, as a result of the experiment I was running, the x-axis is actually off.



The x-axis is the position of an object and it is crucial for my work to point out the distance at certain points. However, the data I have is not scaled correctly.



As an example, one relevant distance is 0.02 mm on the plot but I want it to be 0.38 mm (because this is the value it actually was in the experiment).



Is there a way to scale the x-axis so that it accurately portrays the projected distance while keeping all y-values the same (the y-axis is fine)?



I know the value by which I need to multiply the distances in the plot to get the correct distance (roughly 19) but how can I change the x-axis in the plot so that this information is readily there for the viewer?



I guess in a way I want to widen the x-axis by a factor? Is this possible?







python scale axis xscale






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 22:05









Stephanie MendezStephanie Mendez

91




91













  • Why not simply correct the data before plotting it?

    – Davis Herring
    Jan 1 at 22:13











  • I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

    – Stephanie Mendez
    Jan 1 at 22:15











  • I don’t mean correct it in the past—I mean rescale it when making the plot.

    – Davis Herring
    Jan 1 at 22:17



















  • Why not simply correct the data before plotting it?

    – Davis Herring
    Jan 1 at 22:13











  • I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

    – Stephanie Mendez
    Jan 1 at 22:15











  • I don’t mean correct it in the past—I mean rescale it when making the plot.

    – Davis Herring
    Jan 1 at 22:17

















Why not simply correct the data before plotting it?

– Davis Herring
Jan 1 at 22:13





Why not simply correct the data before plotting it?

– Davis Herring
Jan 1 at 22:13













I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

– Stephanie Mendez
Jan 1 at 22:15





I wish I could but the way in which the data was taken did not allow that (for some reason not in my control) and it is already after the fact (I can no longer repeat the experiments), so I have to work with the data I have.

– Stephanie Mendez
Jan 1 at 22:15













I don’t mean correct it in the past—I mean rescale it when making the plot.

– Davis Herring
Jan 1 at 22:17





I don’t mean correct it in the past—I mean rescale it when making the plot.

– Davis Herring
Jan 1 at 22:17












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999300%2fwidening-the-x-axis-by-a-specific-factor%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53999300%2fwidening-the-x-axis-by-a-specific-factor%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

How to fix TextFormField cause rebuild widget in Flutter