Questions tagged [matplotlib]

Matplotlib is a plotting library for Python, built on NumPy and often used interactively with IPython. Its compact "pyplot" interface is similar to the plotting functions of MATLAB®.

Filter by
Sorted by
Tagged with
3
votes
2answers
173 views

Calculating doubling times from data points

In the code below, noisy data points with unique errors are created. From this, an exponential function is fitted to the data points, and then doubling times (10 unit windows) are calculated. I'm ...
6
votes
2answers
175 views

Covering array scraper and sorter

A covering array is an \$N \times k\$ array in which each element is a from a set of \$v\$ symbols, and for every \$t\$ columns, every possible set of \$v^t\$ choices of the symbols appears at least ...
3
votes
1answer
1k views

Drawing a cloud of points

I decided that it would be nice to write some code to draw a cloud of points. Of course my first thought was to draw some random points but the result is not cloud-ish, it is well... random. In the ...
11
votes
1answer
2k views

Modified Taylor diagrams

There is a type of diagram summarizing how well predictions from numerical models fit expectations; one obvious use case is comparing machine-learning regression models. Modified Taylor diagrams are ...
10
votes
2answers
3k views

Predator Prey Simulation

Below is a simple random walk predator prey simulation that is optimized to the best of my abilities. I would love to hear about any improvements that can made. ...
10
votes
1answer
294 views

Visualize Parts of Song as Analyzed by Echonest

This is the a bit of code that works with Echonest API's pyechonest and remix libraries combined with matplotlib.pyplot to offer a simple visual representation of the start and end "parts" of a music ...
1
vote
1answer
405 views

Linear regression with visualization

I have created a small script that: Creates a lot of random points. Runs a small brute force search to find a rect that has a low error, that is a good fit for the data. Runs a linear regression on ...
4
votes
2answers
2k views

Matplotlib-venn and keeping lists of the entries

Having come upon the wonderful little module of matplotlib-venn I've used it for a bit, I'm wondering if there's a nicer way of doing things than what I have done so far. I know that you can use the ...
1
vote
1answer
2k views

Colorbar for Matplotlib 3D patch plot

I am trying to make a 3D grid plot in Python using Matplotlib. The grid consists of hexahedral cells (with qudrilateral surfaces). The surfaces should be colored according to their height, that is: ...
3
votes
1answer
737 views

Plotting many images at once in matplotlib

I am using numpy and matplotlib to do a statistical simulation. The simulation itself is pretty fast thanks to numPy vectorizatio, however the plotting is slow since I still use a ...
7
votes
1answer
2k views

Optimizing very simple piece of “Game of Life” code by taking advantage of NumPy's functionality

Here is the code as it stands right now: ...
6
votes
1answer
765 views

Prepare data for a contour plot with matplotlib

My question concerns the following Python code which is already working. As far as I have seen, there are very elegant solutions of compacting code. Do you have any ideas on how to make the following ...
12
votes
1answer
12k views

Time and temperature displaying program for Raspberry Pi

This program displays either the time, current temperature, 12hr graph of temps, 24 hr graph of temp or a week's graph of temps. Selection is based on user input of one of the GPIO pins. Please ...
3
votes
1answer
691 views

Reading from a file and connect all data in one big data than to use generators

Is there better way to read from a file and connect all data in one big data than to use generators? At the moment, I do the following: use generators to read data from files. use NumPy to pack all ...
5
votes
2answers
285 views

Social network evolution

I am writing a piece of code which models the evolution of a social network. The idea is that each person is assigned to a node and relationships between people (edges on the network) are given a ...