Questions tagged as 'matplotlib'

1
answer

TypeError: Image data can not be converted to float

I have a problem with the following code: import cv2 import matplotlib.pyplot as plt img1 = cv2.imread('images\colombia_city.jpg') img2 = cv2.imread('images\colombia_city_2.jpg') #img = img1 + img2 #img = cv2.add(img1,img2) abc = cv2.addWei...
asked by 18.02.2018 / 02:50
1
answer

Matplotlib Python Values in X axis

With the following code I want you to show me a couple of other things. I want you to show me on the x axis from 0 to 23 that are the amount of data per day that there is and only shows me now 0,5,10,15 and 20. On the other hand I want that in e...
asked by 05.12.2017 / 17:00
1
answer

Colors in a Scatter Plot with Matplotlib

I tell you a little about what my problem is about, I have a very large 3000x16 matrix, as you can imagine each column is 3000x1. I want to make the scatter diagram of one of the columns, called mos, against another 11, that is, 11 scatter diagr...
asked by 08.06.2017 / 23:34
1
answer

Indicate data in bar graph with matplotlib

I am working with a table that indicates the number of the day, the time of day and a number of visits And I want to create a bar graph that indicates the number of visits per hour (like the one in the image) But, how can I als...
asked by 14.08.2018 / 16:59
1
answer

Change value shown by axes

I have an image in python that I graphic with the following code: from PIL import Image plt.figure() im = Image.open('background.png') extent = Deg2meters([11.0,12.5],[54,54.75], ref).T extent = np.delete(extent, np.s_[2], axis=1) extentlist...
asked by 14.07.2017 / 11:22
1
answer

How to use the matplotlib library

Good afternoon, I have to make a program that reads a .csv file with the following format:    15,10,10,15,20,25,25   20,20,10,10, -25,25,10 and generate the graph of audiogram . I have the following code: import matplotlib.pyplot a...
asked by 12.06.2017 / 23:46
1
answer

ValueError: x and and must have same first dimension

Greetings: I'm pretty new using Python and I was practicing with the following problem: I wanted to graph the value of heat transfer through an aluminum plate (I tried to make it as simple as possible by simply practicing how to graph resu...
asked by 11.01.2017 / 01:20
1
answer

The bars do not start at the desired x value

Hello, sorry, I'm new to Matplotlib and I have a problem. I have 2 queries to Mysql and I get 2 lists of data to graph with bars. The problem is that the second bar (red) should start at point 06 of the x axis and start at 01 with the other bar...
asked by 29.03.2018 / 02:39
1
answer

Runtine error when using multiprocessing in Windows: freeze_suport ()

This is the code of an audio player (.wav), which uses Matplotlib to graph the spectrum, which I have been modifying: import matplotlib import pyaudio import wave import sys import numpy as np import multiprocessing duration = 12.5 filename...
asked by 29.03.2018 / 02:47
0
answers

I need to graph the data of a sensor in python and when the figure is opened it does not respond. Is there a problem in the code?

I need to graph in real time the values I read from a sensor connected to a mega arduino. This is the arduino code: void setup() { Serial.begin(19200); } void loop() { int num = analogRead(A0); Serial.println(num); delay(50); } and the co...
asked by 18.02.2018 / 02:53