Question

Using Python please create a code that #Use NumPy and MatPlotLib to create a plot of...

Using Python please create a code that

#Use NumPy and MatPlotLib to create a plot of f(x) = x**4 + 10
# in the range x=(-10, 10) (inclusive), with a point on the plot every 0.5 change in x.
# Include the correct import statements

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

Program:

import numpy as np
from matplotlib import pyplot as plt

x = np.linspace(-10,10,41)
y = x**4 + 10
plt.xlabel("x")
plt.ylabel("y")
plt.plot(x,y)
plt.show()

Execution and Output:

Add a comment
Know the answer?
Add Answer to:
Using Python please create a code that #Use NumPy and MatPlotLib to create a plot of...
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
  • IN PYTHON 3 GIVING THIS CODE %matplotlib inline import numpy as np import matplotlib.pyplot as plt...

    IN PYTHON 3 GIVING THIS CODE %matplotlib inline import numpy as np import matplotlib.pyplot as plt from sklearn import datasets N_samples = 2000 X = np.array(datasets.make_circles(n_samples=N_samples, noise=0.05, factor=0.3)[0]) plt.scatter(X[:,0], X[:,1], alpha=0.8, s=64, edgecolors='white'); Use Spectral Clustering to cluster the points and visualize your result

  • must be python programming. consider function f(x) = sin(x) in the range of 0to pi. create...

    must be python programming. consider function f(x) = sin(x) in the range of 0to pi. create a python code to calculate f’ (derivative of f(x)) in this range and plot these points. calculate the error at all the discrete points. Please do not use Numpy you can use matplotlib

  • using python Type: pip3 install matplotlib This installs the matplotlib and you should be able to...

    using python Type: pip3 install matplotlib This installs the matplotlib and you should be able to run the code listed below in line_graph_example.py. The original x_coords list had n+1 entries where n = 4. Make a new x_coords list have 2*n +1 elements [0, 1, ..., 2*n] and augment the y_coords by adding (using insert) a new value between any two old elements. The new value should be the (average of neighbors +1). Then plot the new data. Line graph...

  • Problem 2 using Python NumPy and Pandas libraries NOTES: Import NumPy as np and Pandas as...

    Problem 2 using Python NumPy and Pandas libraries NOTES: Import NumPy as np and Pandas as pd Given the following piece of code to create a NumPy array, anIntArray: anIntArray = np.random.randint(5, 72, 48) Add Python code to convert this array into a Pandas series and then extract values stored at the positions 0, 5, 10, 15, 20 of the series.

  • Using Python - Pandas and Numpy Data Structures: *use np.randint create 2 columns of 10 random...

    Using Python - Pandas and Numpy Data Structures: *use np.randint create 2 columns of 10 random numbers from dataframe *Code for creating and printing a 2 by 3 numpy array of random numbers

  • In Python use the two arrays, X and Y, given below to create A_99 using numpy...

    In Python use the two arrays, X and Y, given below to create A_99 using numpy array math rather than a for-loop. Then calculate the standard deviation of A_99 and create a filled contour plot of X, Y, A_99. # given X and Y arrays X,Y = np.meshgrid(np.arange(0,10),np.arange(0,10)) A_99 = np.array(())

  • This is a python matplotlib question. So it would be great if you could show me...

    This is a python matplotlib question. So it would be great if you could show me in python method. I have this loadtxt that asked to plot histogram of wind gusts(column 3) that lie in direction angle(column 2) from min angle to max angle inclusively. I don't know how to include min_angle and max_angle into my codes. Histogram of wind gust speeds As before the file akaroawindgusts.txt contains hourly maximum wind gusts speeds at the Akaroa Electronic weather station (EW)...

  • do it in python 1. Import the proper libraries: Pandas and NumPy and create aliases pd,...

    do it in python 1. Import the proper libraries: Pandas and NumPy and create aliases pd, np respectively. 2. Load sample data (car_loan.csv) into data frame: df 3. Export Pandas DataFrames to csv. Save file name as out.csv. hint: help(df.to_csv) 4. Run the command: df.info (). What do you see, how many columns? also what about number of entries for each column 5. It is often the case where you change your column names or remove unnecessary columns. a. Change...

  • Python Programming language. Complete the problems below using Jupyter Notebook. Problem Needs to be solved from...

    Python Programming language. Complete the problems below using Jupyter Notebook. Problem Needs to be solved from number #1 link provided for the Data: -----> https://docs.google.com/spreadsheets/d/1TqhyxFKQlOHAyXpQBL-4C96kgZFBoMwUgE8-b33CqPQ/edit?usp=sharing PROBLEMS # 0.0 Import the libraries (pandas, matplotlib, and seaborn) Include the code line: %matplotlib inline #Include the code line: plt.style.use(“ggplot”) #Load the data using pandas #Inspect the data using head(), dtypes ANSWERD: import pandas as pd import matplotlib.pyplot as plt import seaborn as sns plt.style.use('ggplot') %matplotlib inline df = pd.read_csv() print(df.head()) print(df.dtypes) # 1...

  • PLEASE USE PYTHON*** 11.2 Create a numpy array with values 10, 11, ..., 49 and give...

    PLEASE USE PYTHON*** 11.2 Create a numpy array with values 10, 11, ..., 49 and give it to a variable named var. Then print out var

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