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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:21:31+00:00 2026-06-13T13:21:31+00:00

I’m using matplotlib. I have a list of 600 values. I also have an

  • 0

I’m using matplotlib. I have a list of 600 values. I also have an polynomial function that I’m graphing with values between 0 and 600. I’m trying to multiply every point by the corresponding value in the list.

I could evaluate the polynomial in a loop, and do the multiplication there, but I would end up with a graph of points instead of a line.

I think I might need to use the Transformations framework, but not sure how to apply it to the graph.

Edit:

a = [5, 2, 3 ... 0, 2, 8] # 600 values
poly_a = polyfit(a)

deriv_a = polyder(poly_a)

b = [232, 342 ... 346, 183] # 600 values

I need to multiply deriv_a by b.

  • 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-13T13:21:32+00:00Added an answer on June 13, 2026 at 1:21 pm

    I think you’re misunderstanding things a bit. This is what numpy is for (if you’re using matplotlib it’s already converting things to a numpy array when you plot, regardless.)

    Just convert your “list of 600 values” to a numpy array and then evaluate the polynomial.

    As an example:

    import numpy as np
    import matplotlib.pyplot as plt
    
    # Your "list of 600 values"...
    x = np.linspace(0, 10, 600)
    
    # Evaluate a polynomial at each location in `x`
    y = -1.3 * x**3 + 10 * x**2 - 3 * x + 10
    
    plt.plot(x, y)
    plt.show()
    

    enter image description here

    Edit:
    Based on your edit, it sounds like you’re asking how to use numpy.polyder?

    Basically, you just want to use numpy.polyval to evaluate the polynomial returned by polyder at your point locations.

    To build on the example above:

    import numpy as np
    import matplotlib.pyplot as plt
    
    # Your "list of 600 values"...
    x = np.linspace(0, 10, 600)
    
    coeffs = [-1.3, 10, 3, 10]
    
    # Evaluate a polynomial at each location in `x`
    y = np.polyval(coeffs, x)
    
    # Calculate the derivative
    der_coeffs = np.polyder(coeffs)
    
    # Evaluate the derivative on the same points...
    y_prime = np.polyval(der_coeffs, x)
    
    # Plot the two...
    fig, (ax1, ax2) = plt.subplots(nrows=2)
    
    ax1.plot(x, y)
    ax1.set_title('Original Function')
    
    ax2.plot(x, y_prime)
    ax2.set_title('Deriviative')
    
    plt.show()
    

    enter image description here

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.