Questions tagged as 'matplotlib'

1
answer

How to put the xticks equal to this figure

I'm doing a Python course for finance. Hence in an exercise you are asked to plot a chart using the DataFrames. So far so good, I have managed to do everything right, but my xticks do not match those of the result! I basically have to get thi...
asked by 28.06.2018 / 22:33
1
answer

Transform two lists of data into a graph with two parallel lines

Galera. I have been trying to do something that is very simple in Excel, but not in Python. I have two lists. Line1 = [1,1,1,0,1,0,1] and Line2 = [0,0,0,0,1,1,1] What I need to do is create a chart with these two lists and put them in para...
asked by 12.05.2018 / 17:04
1
answer

Matplotlib (Python) slow to plot a 2-D chart?

I have recently come up with the need to use Python to plot graphics with more than 3600 coordinates, but I realized that time may be a problem, but I'm not sure if the code I've done has a performance problem or if it's from the same library:...
asked by 22.03.2018 / 00:09
1
answer

Simulate area of action of points in matplotlib

I need to create a graph where, given the coordinates of the points, a circle of x-ray is created around these points. Simulating the area of operation. I have the following script: ================================ import matplotlib.pyplot...
asked by 08.03.2018 / 23:15
1
answer

Obtaining numerical values of mathematical graphs with python

If you have a data file that allows you to plot a 2d graph (straight line, parabola, a conic), is it possible, starting from the graphic image to extract the numeric values that generated it? Is there a package or technique in python that allows...
asked by 17.02.2016 / 22:01
1
answer

How to plot a graph when closing a computer view script on Raspberry pi?

I have a code using opencv Raspberry Pi and it is executing a loop pattern recognition, in the end I close the script using "Ctrl + X", without any problem! I want to by "stop" the graphics processing, perform a function to plot the recognition...
asked by 31.05.2014 / 00:15
1
answer

How do I show an image according to given Number being this number is by random in python?

import numpy as np import matplotlib.pyplot as plt from PIL import Image import cv2 def showfig(image, ucmap): imgplot=plt.imshow(image, ucmap) img0 = cv2.imread("zero.jpg",0) img1 = cv2.imread("um.jpg",0) from random import randint #gera...
asked by 30.10.2018 / 22:32
1
answer

How to change the color of a curve when the values increase?

I have a dataset. Sometimes some values increase compared to previous ones. resultsCos = [(0, 0.4235497237569061), (0.005, 0.4235497237569061), (0.01, 0.4238950276243094), (0.015, 0.42382596685082874), (0.02, 0.42375690607734806), (0.025, 0.42...
asked by 27.08.2018 / 18:58
2
answers

UnicodeError problem when trying to save a figure with latex text in Matplotlib

Speak up. I am having a problem using the MatPlotLib library. Before the last update of Windows I used the library without any problem. I use it basically to create function graphs and save them in .pdf using Latex formatting for text, below is...
asked by 27.05.2018 / 19:59
1
answer

How to import matplotlib._cntr using the LTS (2.2.0) version of Matplotlib?

To build GeoJson files, use the ._cntr import matplotlib._cntr as cntr When trying to load it using matplotlib 2.2.0 it returns error: ImportError: No module named _cntr How can this module be imported? Older versions of matplotlib a...
asked by 07.03.2018 / 19:22