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 8299657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:14:00+00:00 2026-06-08T16:14:00+00:00

i have load profile data where x axis is load profile such that for

  • 0

i have load profile data where x axis is load profile such that for multiple same values of x (constant load) i have different values for y.
till now in excel i used to line plot y and right click graph->selec data->change hoizontal axis data by providing it range o x axis data and that used to give me the graph

Sample Chart

the problem i have is when i try to give
plot(x,y), matplotlib plots y for unique vals of x ie it neglects out all the remaining value of for same value of x.
and when i plot with plot(y) i get sequence numbers on x axis
i tried xticks([0,5,10,15]) for checking out but couldn’t get the required result.
my question is
is it possible to plot a graph in a similar fashion as of excel
the other alternative i could think of was plotting plot(y and plot (x) with same horizontal axis it atleast gives a pictorial idea but is there any means to do it the excel way??

  • 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-06-08T16:14:01+00:00Added an answer on June 8, 2026 at 4:14 pm

    From your description, it sounds to me like you want to use the “scatter” plotting command instead of the “plot” plotting command. This will allow the use of redundant x-values. Sample code:

    import numpy as np
    import matplotlib.pyplot as plt
    
    # Generate some data that has non-unique x-values
    x1 = np.linspace(1,50)
    y1 = x1**2
    y2 = 2*x1
    x3 = np.append(x1,x1)
    y3 = np.append(y1,y2)
    
    # Now plot it using the scatter command
    # Note that some of the abbreviations that work with plot,
    # such as 'ro' for red circles don't work with scatter
    plt.scatter(x3,y3,color='red',marker='o')
    

    scatter plot

    As I mentioned in the comments, some of the handy “plot” shortcuts don’t work with “scatter” so you may want to check the documentation: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.scatter

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

Sidebar

Related Questions

We have a load test that runs of 100 concurrent users. We also have
I have a load once jqgrid that uses a custom formatter to display checkboxes
I have to load a kmz file in to the android application that i
I have to load huge (3000x3000) pictures in SWFLoader, and no problems with that
I need to load a profile layout and then have all of the profile
I have three links in my Rails 3 app that load information in the
I have a Profile form that inherits from sfGuardRegisterForm I have these fields: $this->useFields(
In my model named Profile_model I have this function which retrieves profile data for
I have a profile page that contains a series of images. I want to
We have a process that is getting data in real time and adding records

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.