Questions tagged as 'matplotlib'

1
answer

Change axes and a histogram units with matplotlib

Is it possible to change the units of the axis and of a histogram created with matplotlib (plt.hist), and that instead of counts represent a percentage (counts / total)? The code would be something like this: import matplotlib.pyplot as plt...
asked by 02.07.2017 / 22:15
1
answer

Create and plot fix of slopes between points

Good afternoon everyone, I'm trying to create an array with numpy that contains the slope between each of the points made with the arrays x e y to finally graph them with matplotlib . These are the steps that I am c...
asked by 25.01.2016 / 00:33
2
answers

How do I bleed colors from blue to green in matplotlib?

I'm doing a program to graph 22 different lines but I can not make the color shift be gradual from blue to green so that you can see better the difference in growth between each of the lines instead of a color random Please help import matplot...
asked by 13.09.2018 / 02:18
2
answers

Can you graph in real time in python?

I've been trying to get a graph in real time with matplotlib but it's almost impossible, is there any way I can do this? The issue is that I am receiving data through the usb port and I am storing them in a list, which is increasing as there...
asked by 22.04.2016 / 21:55
1
answer

TypeError: only length-1 arrays can be converted to Python scalars (2)

Hello again I am with the same error but in a different place. Veran I have the following code import matplotlib.pyplot as plt import numpy as np from py_expression_eval import * def f(exp, var, x0): p = Parser() p.ops2['^'] = n...
asked by 03.03.2017 / 01:49
2
answers

Open and close a plot within a while

I'm trying to plot a signal with Matplotlib and the plot is within while . What I want is that every time I go through the while a graph is opened and then either immediately or after a time that I can control it will close. I have...
asked by 22.04.2016 / 10:19
1
answer

Graph with Python, Pandas

I have to graph from a csv file similar to this: Cedula,Genero,Placa,Tipo,Multa,Fecha 0931921407,Femenino,GYS-9575,Automovil,Grave,2016-06-13 0910703362,Masculino,GSF-7654,Automovil,Leve,2016-02-18 0931921408,Femenino,GOI-3298,Automovil,Muy gr...
asked by 23.08.2016 / 02:45
1
answer

Doubt with .show () from matplotlib

Working with matplotlib to generate graphs, I do not quite understand the difference between these two ways of generating and displaying a graph. I have read documentation about it, but it has not been clear to me. Form 1: import matplotlib...
asked by 10.01.2018 / 14:11
1
answer

Move figure title with matplotlib

I am using matplotlib, I have to make a figure with a second x-axis (above the figure), that worked for me with the following code. But when I want to title the figure, it overlays with the name of the top axis. Does anyone know how to solve thi...
asked by 31.07.2017 / 22:23
1
answer

specgram in mainwindow

I am generating an audio spectrum analyzer .. I have already managed to generate the analyzer with certain features that I need, however, I can not make the resulting graphic representation appear in the main window, or that the background co...
asked by 25.03.2018 / 06:27