Questions tagged as 'matplotlib'

0
answers

Interface to plot points on a graph with matplotlib

Good afternoon guys, I use pyqt4 and python 2.7. How do I create what I described in the title? I'm a beginner, forgive me if my programming or explanation is not the best. Below is the code I have so far class AppCAD(qg.QMainWindow): def...
asked by 21.08.2018 / 19:27
0
answers

How to install the matplotlib package in Python 2.7?

I looked at other sites like install matplotlib in Python, but I can not do it at all. I need this module to do some 2D graphics. As an example, I'm trying to use the script: from numpy import * from matplotlib.pyplot import* def main():...
asked by 09.08.2018 / 21:35
0
answers

Code matplotlib does not show y-axis scale

I'm doing a program in Python 2.7.15 to display the data of various temperature sensors in real time by serial communication with the Arduino. However, the chart showed some unwanted problems that I broke my mind trying to solve, but no solution...
asked by 24.07.2018 / 15:22
0
answers

Graphic error and simple list

import matplotlib.pyplot as plt x=[] y=[] z=[] dados=open('dados1.txt','r') for line in dados: line=line.strip() X,Y,Z=line.split() x.append(X) y.append(Y) z.append(Z) dados.close() plt.plot(x,y,'o') plt.plot(x,z,'o') plt.show...
asked by 04.08.2018 / 21:21
0
answers

Relating button made in Tkinter, with graph generated in matplotlib

Good evening! I have the following code, which calls an excel table and converts it to a bar chart: import openpyxl import matplotlib.pyplot as plt book = openpyxl.load_workbook('planilha.xlsx') sheet = book.active celulas = sheet['A2':'B8...
asked by 29.06.2018 / 01:14
2
answers

Customize / set the order X axis graph bars matplotlib

I generated a chart, with values for each year, from 2011 to 2015. but the generation of the graph, on the X-axis, the years are grouped according to the values, are not in the correct sequence (2011, 2012, 2013, 2014, 2015). What command can I...
asked by 07.06.2018 / 04:36
2
answers

Python script does not generate the graph as expected

My algorithm in Python is running perfectly, I just can not generate the graph! I could not identify the error ... What's wrong? import matplotlib.pyplot as plt va=float(input('Digite o valor a ser aplicado: ')) juros=1.05 inflacao=1.02 saque...
asked by 06.06.2018 / 20:52
0
answers

TypeError: importPoisson () takes 1 positional argument but 2 were given

I'm trying to import some data from an external file to be able to generate a graphic and such, but every time of that error, follows my code: You can also talk about errors that you found in my code that can be improved, I'm starting in pyth...
asked by 26.05.2018 / 16:16
0
answers

How can I convert image data to float? Or is there something wrong with the code?

I'm testing a code and I had problems: I can not see the image. The message that appears is: TypeError: Image data can not be converted to float (image data can not be converted to float) I could not solve this, please help me CODE: from ma...
asked by 20.05.2018 / 18:18
1
answer

How to define the tangent function in python?

I would like someone to help me define the tangent function using python with constraints on points where the function does not exist (pi / 2 + k * pi (k integer).     
asked by 15.04.2018 / 16:08