Using plot command interactively  English
 Questions posted on Forums
 Python 3.4.3 Tutorials  English

Advance Matrix Operator
please explain U,V Sigma
0405M 5060SJune 20, 2024, 5:42 a.m. 26_nkarankar

plotting command
I am getting syntax error while executing linspace command meanwhhile the plot command also not executing.
1112M 1020SJune 18, 2024, 11:54 a.m. vangara

Assignment
in python if I am typing the question it is showing NameError: name 'sequence_name' is not defined
0809M 1020SJune 21, 2024, 4:44 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
0405M 5060SJune 21, 2024, 4:47 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
0405M 5060SJune 21, 2024, 4:43 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
0405M 5060SJune 20, 2024, 10:27 p.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
0910M 010SJune 19, 2024, 3:59 a.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
0910M 010SJune 18, 2024, 12:34 p.m. Atharva_217

Sin not defined
0910M 010SJune 18, 2024, 12:36 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
0910M 010SJune 19, 2024, 1:48 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.
0405M 5060SJune 18, 2024, 11:43 a.m. Ashith_Raj_K

Not getting graph for plot(sin(x)*sin(x)/x
<span style="color: rgb(31, 31, 31); fontfamily: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sansserif; fontsize: 22px; fontvariantligatures: nocontextual;">Not getting graph for plot(sin(x)*sin(x)/x </span><span style="fontfamily: Arial, Helvetica, sansserif; fontsize: small;">Displayed with Name Error: name 'x' is not defined</span><span style="color: rgb(31, 31, 31); fontfamily: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sansserif; fontsize: 22px; fontvariantligatures: nocontextual;"></span><span style="color: rgb(31, 31, 31); fontfamily: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sansserif; fontsize: 22px; fontvariantligatures: nocontextual;"></span><span style="color: rgb(31, 31, 31); fontfamily: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sansserif; fontsize: 22px; fontvariantligatures: nocontextual;"></span><span style="color: rgb(31, 31, 31); fontfamily: "Google Sans", Roboto, RobotoDraft, Helvetica, Arial, sansserif; fontsize: 22px; fontvariantligatures: nocontextual;"></span>
1011M 1020SJune 20, 2024, 9:52 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.
0809M 010SJune 14, 2024, 12:15 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_'
0203M 1020SJune 20, 2024, 2:53 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.
1112M 1020SJune 20, 2024, 7:12 a.m. 20001002020

Exercise question
How can we solve Exercise 1?
0809M 010SJune 19, 2024, 1:58 a.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.
0203M 4050SJune 20, 2024, 5:11 p.m. pavureddy1234@gmail.com

Exercise 1
In this question,plot(sin(x)*sin(x))/x.what is the value of x?
0809M 010SJune 20, 2024, 7:17 a.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.
0102M 1020SJune 14, 2024, 11:45 a.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?
0506M 1020SJune 17, 2024, 8:54 a.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/mpldata/images/matplotlib.ppm": no such file or directory. please help me. sir/maim
0607M 5060SJune 17, 2024, 8:20 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/mpldata/images/matplotlib.ppm": no such file or directory. please help me. sir/maim
0405M 5060SJune 20, 2024, 4:07 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 matplotlibImportError Traceback (most recent call last)<ipythoninput20484cd13f94d> in <module>> 1 import matplotlibc:\users\dell\appdata\local\programs\python\python36\lib\sitepackages\matplotlib\__init__.py in <module> 172 173> 174 _check_versions() 175 176c:\users\dell\appdata\local\programs\python\python36\lib\sitepackages\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.
0102M 5060SJune 20, 2024, 6 a.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
0809M 010SJune 21, 2024, 4:57 a.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
0203M 1020SJune 14, 2024, 1:38 p.m. mumthaj89

How do I install matplotlib .
How do I install matplotlib pls tell me the
0304M 010SJune 20, 2024, 6:06 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
0203M 010SJune 20, 2024, 12:49 a.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]:
0809M 2030SJune 20, 2024, 11:30 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
0809M 1020SJune 19, 2024, 3:15 p.m. anjalideore13@gmail.com

Sin(x) assignment at 8:13
Explain in detail sin(x) assignment and concept of finding maxima
0809M 1020SJune 18, 2024, 12:15 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
0607M 1020SJune 17, 2024, 5:14 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)
0809M 1020SJune 17, 2024, 1:46 p.m. sakshithakur18@gmail.com

Exercise 1:
(sin(x)*sin(x))/x not executed..please explain
0809M 2030SJune 18, 2024, 7:10 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
0506M 2030SJune 19, 2024, 10:26 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.
0506M 2030SJune 20, 2024, 10:27 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.
0506M 2030SJune 14, 2024, 8:28 a.m. Hema1122

command not working
Plot command is not working, even after including python files.
0405M 4050SJune 18, 2024, 12:04 p.m. Indrajap

DLL load failed
when i m try to run %pylab , the interpreter showing DLL load failed error
0203M 010SJune 18, 2024, 2:32 p.m. Cms

phyton3matlablib
plot (sin(x)*sin(x))/xin this how to define 'x' value?
0809M 1020SJune 20, 2024, 5:14 p.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?
0708M 1020SJune 18, 2024, 4:22 a.m. ANITHAM11

how to install matplotlib in ipython3
how to install matplotlib in ipython3
0102M 010SJune 16, 2024, 4:36 a.m. AMITKUMARSHINDE57

Exercise 1
How to write this command in interpreter
0809M 010SJune 19, 2024, 5:47 a.m. tdcse

pylab
how to install pylab
0203M 5060SJune 14, 2024, 2:26 a.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 Rprogramming sir? then which language i have to prefer, either Rprogramming or Python for mathematics computations ,data analysis etc .?
0910M 1020SJune 18, 2024, 10:05 a.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
0809M 1020SJune 17, 2024, 6:35 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?
0708M 1020SJune 16, 2024, 7:07 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
0304M 3040SJune 16, 2024, 1:12 a.m. swetha.ece

error
plot(sin(x)*sin(x))/xshowing error as " name x is not defined"
0809M 2030SJune 17, 2024, 2:18 p.m. feridoz

plotting
i want to know how does cos(t) and sin(t) differ?
0607M 010SJune 15, 2024, 8:58 a.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
0809M 2030SJune 16, 2024, 1:11 a.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.
1112M 1020SJune 17, 2024, 7:27 a.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
0102M 010SJune 11, 2024, 10:46 p.m. Mudakavi

Diffrent Colour Arguments
What are the different colors we can use such as green,blue and many more.i wrote
0203M 4050SJune 17, 2024, 11:46 p.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
0001M 010SJune 20, 2024, 5:26 p.m. Nigam.1611

Plot commands not working in Ipython
Dear sir/MadamMatplot commands are not working in Ipython
1112M 1020SJune 17, 2024, 1:04 p.m. yksawarkar

plot (sin(x)*sin(x))/x
question not executed??x is not defined??
0809M 1020SJune 20, 2024, 10:26 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, matplotlibNameError Traceback (most recent call last)<ipythoninput178cad429aec3> in <module>> 1 numpy, matplotlibNameError: name 'numpy' is not definedIn [2]: import numpyIn [3]: import matplotlibImportError Traceback (most recent call last)<ipythoninput30484cd13f94d> in <module>> 1 import matplotlibc:\\users\\admin\\appdata\\local\\programs\\python\\python3732\\lib\\sitepackages\\matplotlib\\__init__.py in <module> 198 199> 200 _check_versions() 201 202c:\\users\\admin\\appdata\\local\\programs\\python\\python3732\\lib\\sitepackages\\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\\python3732\\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, matplotlibImportError Traceback (most recent call last)<ipythoninput41ba94c9f5666> in <module>> 1 import numpy, matplotlibc:\\users\\admin\\appdata\\local\\programs\\python\\python3732\\lib\\sitepackages\\matplotlib\\__init__.py in <module> 198 199> 200 _check_versions() 201 202c:\\users\\admin\\appdata\\local\\programs\\python\\python3732\\lib\\sitepackages\\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\\python3732\\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
0102M 2030SJune 17, 2024, 2:25 a.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???
0102M 1020SJune 16, 2024, 1:06 a.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
0708M 5060SJune 21, 2024, 5:12 a.m. esthervs

import matplotlib error
I installed matplotlib but it shows version related message and matplotlib is not import.
0001M 4050SJune 21, 2024, 5:28 a.m. amrendra91

plot() function error
Throwing error for x value not found
0809M 1020SJune 20, 2024, 5:34 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
0001M 010SJune 17, 2024, 2:56 p.m. ch.gopikrishnaa

1Getting started with IPython

Using plot command interactively

3Embellishing a plot

4Saving plots

5Multiple plots

6Subplots

7Additional features of IPython

8Loading Data From Files

9Plotting Data

10Other Types Of Plots

11Plotting Charts

12Getting started with Lists

13Getting started with for

14Getting started with strings

15Getting started with files

16Parsing data

17Statistics

18Getting started with arrays

19Accessing parts of arrays

20Image manipulation using Arrays

21Basic Matrix Operations

22Advanced Matrix Operations

23Least square fit

24Basic datatypes and operators

25Sequence datatypes

26Inputoutput

27Conditional Statements

28Loops

29Manipulating lists

30Manipulating strings

31Getting started with tuples

32Dictionaries

33Sets in Python

34Getting Started with Functions

35Advanced Features of Functions

36Using Python Modules

37Writing Python Scripts

38Testing and Debugging

39Handling Errors and Exceptions
Questions posted on ST Forums:
81012 visits
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
Width:  808  Height:  600 

Duration:  00:11:12  Size:  3.5 MB 
Show video info