Other Types Of Plots - English
- Questions posted on Forums
- Python 3.4.3 Tutorials - English
-
Why I am getting this error to open the file?
Why I am getting this error to open the file?https://drive.google.com/file/d/1nLx3Vx90CqHOgEmQzgG0SLdVypvRLt3P/view?usp=sharingI am stuck in this problem but you haven't answered from many days.
02-03M 0-10SMay 15, 2025, 5:47 a.m. sc256356
-
year,profit problem
In [3]: year, profit = loadtxt("/Users/91739/company-a-data.txt", dtype=type(int()))---------------------------------------------------------------------------ValueError Traceback (most recent call last)Input In [3], in <module>----> 1 year, profit = loadtxt("/Users/91739/company-a-data.txt", dtype=type(int()))ValueError: too many values to unpack (expected 2)
02-03M 40-50SMay 14, 2025, 4:59 p.m. Ashwani55
-
WHY WE USE ** AND WHEN IN IPYTHON3?
WHY WE USE DOUBLE MULTIPLY SIGN ** AND WHEN IN IPYTHON3
05-06M 50-60SMay 15, 2025, 3:51 a.m. khandelwal35051
-
WHEN WE USE ' ' &" " IN IPYTHON3 & WHY?
when we use ' ' and " " in ipython3 why
05-06M 50-60SMay 15, 2025, 3:37 p.m. khandelwal35051
-
Enquiring about colour
Dear Sir/Madam,If we use 'b' symbol for blue what is the symbol we use foe brown,black etcother than uing the symbols can we use the complete word with single quote
07-08M 20-30SMay 10, 2025, 8:26 p.m. harshithagiyer@gmail.com
-
Scatter Plot
How the change the shape of markers in scatter plot.
04-05M 10-20SMay 12, 2025, 9:18 p.m. HITESH_NINAMA
-
end video question
why is the answer false? is color="b" and color = "blue" different things?
07-08M 10-20SMay 15, 2025, 3:28 p.m. lordprakrit@gmail.com
-
Loglog()
Sir/MamThe graph is a straight line due to non linear scaling.What does it really mean? I can't understand it.
05-06M 0-10SMay 15, 2025, 3:38 p.m. Hema_R232001
-
Other Types Of Plots
not able to execute cat command and loadtxt. I hadsame issue in basic video 8(loading dat from file).In [45]: %pylabUsing matplotlib backend: TkAggPopulating the interactive namespace from numpy and matplotlibIn [46]: cat company-a-dat.txt File "<ipython-input-46-e95588f4945f>", line 1 cat company-a-dat.txt ^SyntaxError: invalid syntaxIn [47]: cat company-a-data.txt File "<ipython-input-47-37dbbe0090a4>", line 1 cat company-a-data.txt ^SyntaxError: invalid syntaxIn [48]: cat company-a-data.txt File "<ipython-input-48-37dbbe0090a4>", line 1 cat company-a-data.txt ^SyntaxError: invalid syntaxIn [49]: cat company-a-data.txt File "<ipython-input-49-37dbbe0090a4>", line 1 cat company-a-data.txt ^SyntaxError: invalid syntaxIn [50]: year,profit=loadtxt('company-a-dat.txt) File "<ipython-input-50-6c82ded6f088>", line 1 year,profit=loadtxt('company-a-dat.txt) ^SyntaxError: EOL while scanning string literalIn [51]: year,profit=loadtxt('company-a-dat.txt')---------------------------------------------------------------------------OSError Traceback (most recent call last)<ipython-input-51-9d4241c7c624> in <module>----> 1 year,profit=loadtxt('company-a-dat.txt')c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin, encoding, max_rows) 979 fname = os_fspath(fname) 980 if _is_string_like(fname):--> 981 fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) 982 fencoding = getattr(fh, 'encoding', 'latin1') 983 fh = iter(fh)c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(path, mode, destpath, encoding, newline) 267 268 ds = DataSource(destpath)--> 269 return ds.open(path, mode, encoding=encoding, newline=newline) 270 271c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(self, path, mode, encoding, newline) 621 encoding=encoding, newline=newline) 622 else:--> 623 raise IOError("%s not found." % path) 624 625OSError: company-a-dat.txt not found.In [52]: year,profit=loadtxt('company-a-data.txt')---------------------------------------------------------------------------OSError Traceback (most recent call last)<ipython-input-52-b48e6119614d> in <module>----> 1 year,profit=loadtxt('company-a-data.txt')c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin, encoding, max_rows) 979 fname = os_fspath(fname) 980 if _is_string_like(fname):--> 981 fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) 982 fencoding = getattr(fh, 'encoding', 'latin1') 983 fh = iter(fh)c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(path, mode, destpath, encoding, newline) 267 268 ds = DataSource(destpath)--> 269 return ds.open(path, mode, encoding=encoding, newline=newline) 270 271c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(self, path, mode, encoding, newline) 621 encoding=encoding, newline=newline) 622 else:--> 623 raise IOError("%s not found." % path) 624 625OSError: company-a-data.txt not found.In [53]: year,profit=loadtxt('company-a-data.txt',unpack=true)---------------------------------------------------------------------------NameError Traceback (most recent call last)<ipython-input-53-de6020824536> in <module>----> 1 year,profit=loadtxt('company-a-data.txt',unpack=true)NameError: name 'true' is not definedIn [54]: year,profit=loadtxt('company-a-data.txt',unpack=True)---------------------------------------------------------------------------OSError Traceback (most recent call last)<ipython-input-54-070812f8b62f> in <module>----> 1 year,profit=loadtxt('company-a-data.txt',unpack=True)c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin, encoding, max_rows) 979 fname = os_fspath(fname) 980 if _is_string_like(fname):--> 981 fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) 982 fencoding = getattr(fh, 'encoding', 'latin1') 983 fh = iter(fh)c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(path, mode, destpath, encoding, newline) 267 268 ds = DataSource(destpath)--> 269 return ds.open(path, mode, encoding=encoding, newline=newline) 270 271c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\numpy\lib\_datasource.py in open(self, path, mode, encoding, newline) 621 encoding=encoding, newline=newline) 622 else:--> 623 raise IOError("%s not found." % path) 624 625OSError: company-a-data.txt not found.In [55]:
02-03M 10-20SMay 12, 2025, 7:34 p.m. vaishali5780@gmail.com
-
error while other types of plots
Dear AllI am getting errorn[13]: bar(year,profit)Out[13]: <BarContainer object of 11 artists>kindly help.thanks
00-01M 20-30SMay 15, 2025, 9:17 a.m. gaganj1981@gmail.com
-
error while loading file on prompt
Dear Allwhile using following command i get error,kindly help,..moreover in python for beginners,video of loading data from files is missing..kindly share In [5]: cat /Users/Gagan/Desktop/company-a-data.txt---------------------------------------------------------------------------NameError Traceback (most recent call last)<ipython-input-5-6df361578c72> in <module>----> 1 cat /Users/Gagan/Desktop/company-a-data.txtNameError: name 'cat' is not defined
00-01M 40-50SMay 15, 2025, 1:34 p.m. gaganj1981@gmail.com
-
scatter and plot are not same?
I used scatter and plot command as per the exercise given. i plotted them in subplot to have comparison for the given data x=linspace(1,20,100) and y=5x3. I am getting exactly same plot. while in tutorial answer says 'NO'. why this is so?
07-08M 10-20SMay 15, 2025, 5:31 a.m. gourihalde@gmail.com
Questions posted on ST Forums:
Outline:
scatter plot scatter function scatter plot with various arguments logarithmic plot loglog function cat command loadtxt function unpack parameter of loadtxt linspace scatter versus plot