Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 901215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:31:16+00:00 2026-05-15T15:31:16+00:00

I have two graphs with in one image, each with 5 points. Their value

  • 0

I have two graphs with in one image, each with 5 points. Their value on the X axis is not important, all that I require is that they’re all equally distributed on it.

import matplotlib.pyplot as plt


data = [43,51,44,73,60]
data2 = [34,25,42,53,61]

fig = plt.figure(1)
ax = fig.add_subplot(111)

ax.plot(data, '-o', color='#000000', lw=1, ms=6)
ax.plot(data2, '-o', color='#000000', lw=1, ms=6)

plt.show()

This creates a graph like the one below.

I need the second graph (the one using the data2 points) to start from 5 on the X axis, not from 0, meaning it’ll have the points at (5,34),(6,25),(7,42),(8,53),(9,61). How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:31:18+00:00Added an answer on May 15, 2026 at 3:31 pm

    Make a list of the X values,

    x = [5,6,7,8,9]
    

    and use

    ax.plot(x, data2, ...)
    

    Note that you could also use range(5,10) or numpy’s arange(5,10) or linspace(5,9,5) to generate the X values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two image div in HTML i want that onclik of one image
In our C# .NET application we have two DirectShow filter graphs each showing a
I am using ZedGraph's master pane to display two graphs that have synchronized X
I have a graph with two plots. One plot shows 10 data points and
I am trying to have two data series plotted in one graph as boxes
Suppose I have two columns in a table that represents a graph, the first
I have several nodes (undirected graph, bidirecional) ... Each two nodes have a distance...
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two classes (MVC view model) which inherits from one abstract base class.
I have one base image (image1) depicting a quantity in a space for time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.