Question

Hi, I am having trouble with using the matplotlib function in python. A tutorial in this question and a lesson on how to use it would be great. Thanks so much.2- Write a program using matplotlib that gives the following output Consider 100 points between [0,10] Fiqure 1 10 8 10 #Your

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

import numpy as np

import matplotlib.pyplot as plt

x=np.linspace(0,10,100) #to get the x axis values.

y=np.sin(x) #to get the amplitude

y1=np.sin(2*x) #to get the amplitude

y2=np.sin(3*x) #to get the amplitude

plt.subplot(3,1,1)

plt.plot(x,y)

plt.subplot(3,1,2)

plt.plot(x,y1)

plt.subplot(3,1,3)

plt.plot(x,y2)

plt.show()

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Hi, I am having trouble with using the matplotlib function in python. A tutorial in this...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I'm having trouble with the following Python homework assignment question in ZyBooks: 2.14 HW: Driving costs...

    I'm having trouble with the following Python homework assignment question in ZyBooks: 2.14 HW: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is: 20.0 3.1599 Then the output is: 1.579950 7.899750 63.198000 Any assistance is greatly appreciated. Thanks!

  • I am new to Python and am having trouble coming up with writing code to the...

    I am new to Python and am having trouble coming up with writing code to the following problem... The program must: Prompt for a file name Opens that file and reads through the file Displays a custom error message if the file does not exist You can pull the hour out from the 'From ' line by finding the time and then splitting the string a second time using a colon. From [email protected] Sat Jan 5 09:14:16 2008 Accumulated the...

  • HI, I am having trouble with this question. Its in The Basics of Practice of Statistics...

    HI, I am having trouble with this question. Its in The Basics of Practice of Statistics 8th edition by Moore, chapter 12 question 22. You read in a book on poker that the probability of being dealt a straight flush in a five-card poker hand is 1/64,974. This means that... a) if you deal millions of poker hands, the fraction of them that contain a straight flush will be very close to 1/64,974 b) if you deal 64,974 poker hands,...

  • Hi, I am having trouble with the following question: Given an unsorted array with integers, find...

    Hi, I am having trouble with the following question: Given an unsorted array with integers, find the median of it using the Quick Select method we’ve discussed in the class (Hint: We use the quick select to find the kth smallest element in an unsorted array in O(n) time complexity). Note: A median is the middle number of the array after it is sorted. And in this problem, we return the N/2-th number after sorted if there are even numbers...

  • I am having trouble with these three problems that are in the attached document, thank you...

    I am having trouble with these three problems that are in the attached document, thank you for your help. 9. Using your calculator, find the csc(-200). 10. Solve the following right triangle (see image.) 11. Find a trigonometric equation for the following graph (see image.) Thanks !! Images:

  • Hi, I am writing Java code and I am having a trouble working it out. The...

    Hi, I am writing Java code and I am having a trouble working it out. The instructions can be found below, and the code. Thanks. Instructions Here are the methods needed for CIS425_Student: Constructor: public CIS425_Student( String id, String name, int num_exams ) Create an int array exams[num_exams] which will hold all exam grades for a student Save num_exams for later error checking public boolean addGrade( int exam, int grade ) Save a grade in the exams[ ] array at...

  • Hi, I'm having trouble solving this problem... Could you please solve it using clear detailed steps...

    Hi, I'm having trouble solving this problem... Could you please solve it using clear detailed steps so that I can better understand how to tackle it next time? Thanks! :) Consider the following image. (Take q1 +2.95 nC and q28.44 nC.) gh 42 (a) Find the net electric flux through the cube shown in the figure above. N m2/c (b) Can you use Gauss's law to find the electric field on the surface of this cube? Yes No Explain

  • This is python code I am having trouble with the both winning messages printing if the...

    This is python code I am having trouble with the both winning messages printing if the user guesses in 1 try. 1 message or the other should print depending on the number of guesses not both. Thank you for your help! import random answer = 5 tries = 0 user_guess = "" while True: user_guess = int(input("enter a number between 1 and 10: ")) tries = tries + 1    if user_guess == answer: print ("You win! \nIt took you",...

  • Hi, I am having trouble with this question. I'm not sure why it was wrong. Please...

    Hi, I am having trouble with this question. I'm not sure why it was wrong. Please show your work, so I can correct my thinking. I appreciate your help! Problem 3.14 Mendel crossed peas with round, green seeds with peas having wrinkled, yellow seeds. All F1 plants had seeds that were round and yellow Part A Predict the results of testcrossing these F1 plants. O 1/4 round, yellow; 1/4 round, green; 1/4 wrinkled, yellow; 1/4 wrinkled, green O1/2 round, yellow:...

  • Hi, I'm having trouble solving this problem... Could you please solve it using clear detailed steps...

    Hi, I'm having trouble solving this problem... Could you please solve it using clear detailed steps so that I can better understand how to tackle it next time? Thanks! :) A charge of 100 AHC is at the center of a cube of edge 75.0 cm. No other charges are nearby. (a) Find the total flux through each face of the cube. (b) Find the flux through the whole surface of the cube N m2/c (a) would change O (b)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT