Using plot command interactively - English
- Questions posted on Forums
- Python 3.4.3 Tutorials - English
-
Advance Matrix Operator
please explain U,V Sigma
04-05M 50-60SMay 15, 2025, 2:56 a.m. 26_nkarankar
-
plotting command
I am getting syntax error while executing linspace command meanwhhile the plot command also not executing.
11-12M 10-20SMay 14, 2025, 9:58 p.m. vangara
-
Assignment
in python if I am typing the question it is showing NameError: name 'sequence_name' is not defined
08-09M 10-20SMay 15, 2025, 10:54 a.m. prisha28
-
plot lines
when I enter my command the figure or the graph doesn't pop up and I am using MacBook Pro with ipython 8.23 and python 3.12
04-05M 50-60SMay 15, 2025, 4:14 p.m. prisha28
-
plot lines
when I enter my command the figure or the graph doesn't pop up and I am using MacBook Pro with ipython 8.23 and python 3.12
04-05M 50-60SMay 15, 2025, 9:17 a.m. prisha28
-
plot lines
when I enter my command the figure or the graph doesn't pop up and I am using MacBook Pro with ipython 8.23 and python 3.12
04-05M 50-60SMay 15, 2025, 6:45 a.m. prisha28
-
Sin not defined
np.linspace(-np.pi,np.pi,100)plt.plot((sin(x)*sin(x))/x)NameError Traceback (most recent call last) Cell In[2], line 2 1 np.linspace(-np.pi,np.pi,100) ----> 2 plt.plot((sin(x)*sin(x))/x) NameError: name 'sin' is not defined
09-10M 0-10SMay 15, 2025, 1:47 p.m. Atharva_217
-
Sin not defined
np.linspace(-np.pi,np.pi,100)plt.plot((sin(x)*sin(x))/x)NameError Traceback (most recent call last) Cell In[2], line 2 1 np.linspace(-np.pi,np.pi,100) ----> 2 plt.plot((sin(x)*sin(x))/x) NameError: name 'sin' is not defined
09-10M 0-10SMay 12, 2025, 10:31 p.m. Atharva_217
-
Sin not defined
09-10M 0-10SMay 15, 2025, 2:09 p.m. Atharva_217
-
Sin not defined
np.linspace(-np.pi,np.pi,100)plt.plot((sin(x)*sin(x))/x)NameError Traceback (most recent call last) Cell In[2], line 2 1 np.linspace(-np.pi,np.pi,100) ----> 2 plt.plot((sin(x)*sin(x))/x) NameError: name 'sin' is not defined
09-10M 0-10SMay 13, 2025, 8:09 p.m. Atharva_217
-
Plot command
I am using windows 11 and jupyter notebook instead of Linux. Graph is not drawing in any case it just showing the x,y coordinates .Name error is occurring most of the times - name 'plot' is not defined, name 't' is not defined, name 'cos' is not defined , name 'sin' is not defined. So I am stuck and I couldn't able to find solution in google.
04-05M 50-60SMay 15, 2025, 8:21 a.m. Ashith_Raj_K
-
Not getting graph for plot(sin(x)*sin(x)/x
<span style="color: rgb(31, 31, 31); font-family: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 22px; font-variant-ligatures: no-contextual;">Not getting graph for plot(sin(x)*sin(x)/x </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: small;">Displayed with Name Error: name 'x' is not defined</span><span style="color: rgb(31, 31, 31); font-family: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 22px; font-variant-ligatures: no-contextual;"></span><span style="color: rgb(31, 31, 31); font-family: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 22px; font-variant-ligatures: no-contextual;"></span><span style="color: rgb(31, 31, 31); font-family: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 22px; font-variant-ligatures: no-contextual;"></span><span style="color: rgb(31, 31, 31); font-family: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 22px; font-variant-ligatures: no-contextual;"></span>
10-11M 10-20SMay 13, 2025, 4:44 p.m. Absolute
-
I an unable to solve the below question.Please help
Plot (sin(x)*sin(x))/x. 1. Save the plot as sinsquarebyx.pdf 2. Zoom and find the maxima. 3. Bring it back to initial position.
08-09M 0-10SMay 15, 2025, 2:37 p.m. Partha2003
-
linspace
I have imported numpy ,matplotlib while typing 'linspace?' I am getting error:object 'linspace' not foundHow to solved this error Sir?I have tried ipython --pylabafter that I am getting attributeError : 'version_info' object has no attribute '_version_'
02-03M 10-20SMay 15, 2025, 3:51 p.m. amkarbrahma9773@gmail.com
-
plot command
I did exactly the same as taught in the tutorial and ran the plot command but I am not able to see the plot.Kindly help me out.....it's showing figure 1 but the plot is not visible , only loading can be seen.
11-12M 10-20SMay 15, 2025, 2:40 p.m. 20001002020
-
Exercise question
How can we solve Exercise 1?
08-09M 0-10SMay 15, 2025, 3:44 p.m. AnandPatel
-
practice code
I have problem in running the linspace and plot commands ,even tho I've installed all 3 commands (ipython,numpy,matplotlib). It is showing ERROR:name linspace/plot command is not defined.... please help me out for practicing.
02-03M 40-50SMay 15, 2025, 5:06 a.m. pavureddy1234@gmail.com
-
Exercise 1
In this question,plot(sin(x)*sin(x))/x.what is the value of x?
08-09M 0-10SMay 15, 2025, 2:19 p.m. ashna@cek.ac.in
-
Unable to run "pylab"
DLL Import Failed: Specific Module not foundDear Sir/Ma'am, Its showing this kind of error when running command %pylab in ipython interface.I also installed the C++ Microsoft file from the link given in the installation sheet but its not working.Kindly give some solution to this.
01-02M 10-20SMay 15, 2025, 12:56 p.m. sourav44verma
-
some lib function is not working
i am using Python 3.4.3 windows 64 bit based, linspace(), len(), clf() function are not working in this version. how to do these function in python 3.4.3 version?
05-06M 10-20SMay 14, 2025, 5:19 p.m. rajendaras@yahoo.co.in
-
don't show figure when i run code
t=linspace(-pi,pi,100) plot(t,cos(t)) -->TCL ERROR couldn't open "/usr/share/matplotlib/mpl-data/images/matplotlib.ppm": no such file or directory. please help me. sir/maim
06-07M 50-60SMay 15, 2025, 1:43 p.m. divesh7923
-
tcl error when i run code don't show figure
t=linspace(-pi,pi,100) plot(t,cos(t)) -->TCL ERROR couldn't open "/usr/share/matplotlib/mpl-data/images/matplotlib.ppm": no such file or directory. please help me. sir/maim
04-05M 50-60SMay 15, 2025, 8:49 a.m. divesh7923
-
Import Error: DLL load failed: The specified module could not be found
Sir/ Madam,While I am entering "import matplotlib" command in ipython3, it shows the following:Microsoft Windows [Version 10.0.17134.1667](c) 2018 Microsoft Corporation. All rights reserved.C:\Users\DELL>ipython3Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]Type 'copyright', 'credits' or 'license' for more informationIPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.In [1]: import numpyIn [2]: import matplotlib---------------------------------------------------------------------------ImportError Traceback (most recent call last)<ipython-input-2-0484cd13f94d> in <module>----> 1 import matplotlibc:\users\dell\appdata\local\programs\python\python36\lib\site-packages\matplotlib\__init__.py in <module> 172 173--> 174 _check_versions() 175 176c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\matplotlib\__init__.py in _check_versions() 157 # Quickfix to ensure Microsoft Visual C++ redistributable 158 # DLLs are loaded before importing kiwisolver--> 159 from . import ft2font 160 161 for modname, minver in [ImportError: DLL load failed: The specified module could not be found.Ultimately I am unable to run %pylab.
01-02M 50-60SMay 15, 2025, 2:28 p.m. tsan.chou1993@gmail.com
-
Unable to solve Exercise 1
Hi I am unable to solve Exercise 1: plot(sin(x)*sin(x))*xPlease help me with the solution
08-09M 0-10SMay 15, 2025, 3:56 p.m. Kaustabh3
-
Finding Maxima on graph
how to find maxima in plotted graph? sin sq fn?difference between plot(sin(s)*sin(s))/s and plot((sin(s)*sin(s))/s)two different graphs which one is correct
02-03M 10-20SMay 15, 2025, 8:11 a.m. mumthaj89
-
How do I install matplotlib .
How do I install matplotlib pls tell me the
03-04M 0-10SMay 15, 2025, 4:25 p.m. Minjal
-
Installing Pylab
I am using ubuntu 18.04. installed latest version of python 3.7 version. done all sorts of installing pylab but its always giving an error "ModuleNotFoundError: no module named matplotlib". please help
02-03M 0-10SMay 15, 2025, 4:30 p.m. akhilesh.thool@gmail.com
-
About value
is this is correct? In [21]: x=linspace(-pi,pi,100)In [22]: plot((sin(x)*sin(x))/x ...: )Out[22]: [<matplotlib.lines.Line2D at 0x9d513b8>]In [23]:
08-09M 20-30SMay 15, 2025, 9:54 a.m. pritishataramnevse.1234567890
-
plot(sin(t)*sin(t))/t
before executing plot(sin(t)*sin(t))/t it clear using clf()and the execute this command plot(sin(t)*sin(t))/t
08-09M 10-20SMay 15, 2025, 5:58 a.m. anjalideore13@gmail.com
-
Sin(x) assignment at 8:13
Explain in detail sin(x) assignment and concept of finding maxima
08-09M 10-20SMay 15, 2025, 4:07 p.m. meghna_bhatia
-
error while plotting plot(sin(x)*sin(x))/x
x = linspace(1,100, 50)plot(sin(x)*sin(x))/xwhen i tried to plot this it shows a graph but comes in with a no of errorlikeTypeError: unsupported operand type(s) for /: 'Line2D' and 'float'how to solve this issue
06-07M 10-20SMay 15, 2025, 3:36 p.m. varuntk
-
Plot (sin(x)*sin(x))/x
It gives an error "name 'x' is not defined."I used the command -- plot(x, (sin(x)*sin(x))/x)
08-09M 10-20SMay 15, 2025, 4:39 a.m. sakshithakur18@gmail.com
-
Exercise 1:
(sin(x)*sin(x))/x not executed..please explain
08-09M 20-30SMay 15, 2025, 1:40 p.m. madhurigawali31@gmail.com
-
plot function
Plot (sin(x)*sin(x))/xwhen i am executing this i am getting a message that name 'x' is not defined.will you please tell me what is the mistake
05-06M 20-30SMay 15, 2025, 4:52 p.m. Hema1122
-
plot function
i am not getting a smooth curve on executing the plot function for sin and for cos.will you explain me why.
05-06M 20-30SMay 15, 2025, 10:48 a.m. Hema1122
-
plot function
i am not getting a smooth curve on executing the plot function for sin and for cos.will you explain me why.
05-06M 20-30SMay 15, 2025, 3:47 p.m. Hema1122
-
command not working
Plot command is not working, even after including python files.
04-05M 40-50SMay 14, 2025, 4:53 p.m. Indrajap
-
DLL load failed
when i m try to run %pylab , the interpreter showing DLL load failed error
02-03M 0-10SMay 15, 2025, 9:36 a.m. Cms
-
phyton3-matlablib
plot (sin(x)*sin(x))/xin this how to define 'x' value?
08-09M 10-20SMay 15, 2025, 2:49 a.m. anithachirra
-
Plotting graph
Hi..I am using Jupyter notepad with python3 online...after plotting the graph i couldnt find maxima for the same..Can anyone help me out of this?
07-08M 10-20SMay 15, 2025, 1:29 p.m. ANITHAM11
-
how to install matplotlib in ipython3
how to install matplotlib in ipython3
01-02M 0-10SMay 15, 2025, 10:28 a.m. AMITKUMARSHINDE57
-
Exercise 1
How to write this command in interpreter
08-09M 0-10SMay 15, 2025, 4:47 p.m. tdcse
-
pylab
how to install pylab
02-03M 50-60SMay 15, 2025, 3:48 p.m. anithachirra
-
plot
what is the difference between plot() command in python, plot() command in R programming, i think both are working same manner?it looks all commands in python are same as in R-programming sir? then which language i have to prefer, either R-programming or Python for mathematics computations ,data analysis etc .?
09-10M 10-20SMay 13, 2025, 10:01 p.m. G.Shankarr
-
value of x
what should be the value of x in the given problem i have given the value as x=linspace(-1,1,100) but it is giving the plot with errors
08-09M 10-20SMay 15, 2025, 4:26 p.m. krutika.chhajed@gmail.com
-
Query on matplotlib functions
Respected sir,In this video, you have shown to plot the functions of sin and cos. Apart from these two, what are the other functions we can plot?
07-08M 10-20SMay 15, 2025, 3:31 p.m. Vimala.ece
-
QUERY ON linspace
For linspace(0,1,200) we get 200 evenly spaced samples.My doubt is how to you determine the points,especially why is it restricted to 8 decimal places
03-04M 30-40SMay 15, 2025, 3:38 p.m. swetha.ece
-
error
plot(sin(x)*sin(x))/xshowing error as " name x is not defined"
08-09M 20-30SMay 14, 2025, 11:42 p.m. feridoz
-
plotting
i want to know how does cos(t) and sin(t) differ?
06-07M 0-10SMay 15, 2025, 3:33 p.m. palak_desai@yahoo.com
-
value of x
what is the value of x should setif i assign same as t it shows error in cmd window
08-09M 20-30SMay 14, 2025, 9:34 p.m. Rajneesh.ch
-
Related Plot
Applied the commandT=LINSPACE(-PI,PI,100)T=PLOT(T,SIN(T)iN THIS CODE, I DRAWN A PLOT, SO i WANT TO KNOW ABOUT THE "Y AXES " VALUES.
11-12M 10-20SMay 15, 2025, 3:48 p.m. asutosh1984
-
%pylab function not working
%pylab function not working.. tried install numpy and also download C++ visual C as suggested in the installation sheet the prob still persists
01-02M 0-10SMay 15, 2025, 3:15 p.m. Mudakavi
-
Diffrent Colour Arguments
What are the different colors we can use such as green,blue and many more.i wrote
02-03M 40-50SMay 15, 2025, 8:36 a.m. kush.patel101140@marwadiuniversity.ac.in
-
python
is working on ipython is same as working on python 3.5?how to use pylab (plot library ) on idle python 3.5
00-01M 0-10SMay 15, 2025, 10:25 a.m. Nigam.1611
-
Plot commands not working in Ipython
Dear sir/MadamMatplot commands are not working in Ipython
11-12M 10-20SMay 15, 2025, 2:29 a.m. yksawarkar
-
plot (sin(x)*sin(x))/x
question not executed??x is not defined??
08-09M 10-20SMay 15, 2025, 4:18 p.m. spiccyshakti
-
python workshop
Microsoft Windows [Version 10.0.10240](c) 2015 Microsoft Corporation. All rights reserved.C:\\Users\\Admin>ipython3Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)]Type 'copyright', 'credits' or 'license' for more informationIPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.In [1]: numpy, matplotlib---------------------------------------------------------------------------NameError Traceback (most recent call last)<ipython-input-1-78cad429aec3> in <module>----> 1 numpy, matplotlibNameError: name 'numpy' is not definedIn [2]: import numpyIn [3]: import matplotlib---------------------------------------------------------------------------ImportError Traceback (most recent call last)<ipython-input-3-0484cd13f94d> in <module>----> 1 import matplotlibc:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\matplotlib\\__init__.py in <module> 198 199--> 200 _check_versions() 201 202c:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\matplotlib\\__init__.py in _check_versions() 192 ("pyparsing", "2.0.1"), 193 ]:--> 194 module = importlib.import_module(modname) 195 if LooseVersion(module.__version__) < minver: 196 raise ImportError("Matplotlib requires {}>={}; you have {}"c:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\importlib\\__init__.py in import_module(name, package) 125 break 126 level += 1--> 127 return _bootstrap._gcd_import(name[level:], package, level) 128 129ImportError: DLL load failed: The specified module could not be found.In [4]: import numpy, matplotlib---------------------------------------------------------------------------ImportError Traceback (most recent call last)<ipython-input-4-1ba94c9f5666> in <module>----> 1 import numpy, matplotlibc:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\matplotlib\\__init__.py in <module> 198 199--> 200 _check_versions() 201 202c:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\matplotlib\\__init__.py in _check_versions() 192 ("pyparsing", "2.0.1"), 193 ]:--> 194 module = importlib.import_module(modname) 195 if LooseVersion(module.__version__) < minver: 196 raise ImportError("Matplotlib requires {}>={}; you have {}"c:\\users\\admin\\appdata\\local\\programs\\python\\python37-32\\lib\\importlib\\__init__.py in import_module(name, package) 125 break 126 level += 1--> 127 return _bootstrap._gcd_import(name[level:], package, level) 128 129ImportError: DLL load failed: The specified module could not be found.In [5]: import numpy
01-02M 20-30SMay 15, 2025, 12:39 p.m. Reyana_1985
-
How to save a graph in windows ??
There are two ways I tried 1) savefig('C://WINDOWS//SYTEM32'), I tried and executed successfully. But when I tried using as per our regular path like as follows2) savefig('C:\\windows\\system32') it doesnt work. Can we use path like second method or not???
01-02M 10-20SMay 15, 2025, 4:20 p.m. rahul.chinchore
-
Plot (sin(x)*sin(x)) /x.
Hi , in this question we have only one parameter. By using one parameter how can we plot the given statement. and the '/x' is after the plot argument statement. so how will it works? can you explain
07-08M 50-60SMay 15, 2025, 7:52 a.m. esthervs
-
import matplotlib error
I installed matplotlib but it shows version related message and matplotlib is not import.
00-01M 40-50SMay 15, 2025, 3:49 p.m. amrendra91
-
plot() function error
Throwing error for x value not found
08-09M 10-20SMay 15, 2025, 4 p.m. thirukumar
-
import numpy and matplotlab in ipython3
Hello Madam/sir,I am unable to import numpy and matplotlab in ipython3 .please solve my problem
00-01M 0-10SMay 15, 2025, 9:15 a.m. ch.gopikrishnaa
Questions posted on ST Forums:
Outline:
Use Python 3.4.3 Use Ipython version 5.1.0 Start IPython with pylab. ImportError if matplotlib is not installed clf() function Use the linspace function to create equally spaced points in a region. Find the length of sequences using len function. Plot mathematical functions using plot. Clear drawing area using clf. Usage of buttons in the UI of the plot window such as - save, zoom, move axis, back and forward and Home
Assignment
Status: