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®.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
0answers
675 views

Live-streaming tweets and plot its sentimental value in colors on a world map

I want to have someone reviewing and helping me get some good ideas in how to improve my current project. All information about the project is in the following github link. I would also appreciate ...
5
votes
0answers
35 views

Measure size of repository as a function of time

In order to avoid having to make any real progress (at least for a short time), I wrote a script that measures how much progress I have made so far, instead. Specifically, this script sums up the file ...
5
votes
0answers
496 views

Ramachandran plot (plotting the torsion angles of protein backbone)

I would like to have some insights on the code I created. It would be really insightful for me to get some feedback about the code, what I should do differently, if there is an easier, more elegant ...
5
votes
0answers
1k views

Plotting the Mandelbrot set at different zoom levels

I'm interested in making an animated movie of a zoom in on a part of the Mandelbrot set. My code works well for a few zooms, but upon trying to zoom in quite far, I find that the fractal becomes "...
4
votes
0answers
51 views

graphtimer v2 - Utility to plot timings

GitHub repo (MIT) Clone the repo and replace the contents of example.py with the one at the bottom and you'll have everything setup. Explanation of the code A ...
3
votes
0answers
26 views

Simple Kivy App for Bootstrap Algorithm

I have a very simlpe app built using Kivy, for performing bootstrap algorithm (statistics). We must input some samples in the form x1,x2,...,xn (these will be ...
3
votes
0answers
95 views

Converts audio files to fixed size chunks and the chunks to spectrogram images

This code takes in input as audio files (.wav or .WAV) and divides them into fixed-size (chunkSize in seconds) samples. Then these chunks are converted to spectrogram images after applying PCEN (Per-...
3
votes
0answers
47 views

Animation of an incremental rotary encoder

While reworking my teaching materials for an exercise of an introductory course on mobile robotics, I recently created a animation/simulation of an incremental rotary encoder, e.g. often used for ...
3
votes
0answers
63 views

Data set generation with Python and Matplotlib

I want to use Python and Matplotlib to create a data set of images. I want to do this by transforming the plot to a numpy matrix. At the moment it takes about 0.1 second to generate 100 images of size ...
3
votes
0answers
241 views

Time distribution of Twitter data

The tweepy.models.Status class creates a 'tweet' object, it has attribute .created_at which is the posting time of the tweet in ...
3
votes
1answer
69 views

Separate scrap and production by area

I'm looking for feedback on things that can be streamlined in each section. The data it creates is all needed whether it's used in a graph or not so I can't get rid of anything, just combine steps ...
3
votes
0answers
491 views

Python, matplotlib, 3d plot, how to make this code effective, light, fast?

I have already make a 3D mesh. See below: And the code below: ...
3
votes
0answers
2k views

Reading a csv file and making a histogram in Python using NumPy and Matplotlib

I have written the following code which reads a csv file that contains a bunch of words and their sentiment value. Words like abandon may have a value of -1, while words like progress and freedom have ...
3
votes
0answers
138 views

Read in file, Filter out records, output results

I have been working on a project for some time and have let one Python file grow into a huge file that tries to do everything. The structure is pretty flat and I don't like it. I've used other ...
2
votes
0answers
16 views

Matplotlib embedded in tkinter

Investigating how to use tkinter controls with buttons and sliders and to combine these with matplotlib, I have come to the following code. Suggestions for improvements and tips are most welcome. ...
2
votes
0answers
67 views

Sum, validate, and plot monthly inventory levels

The idea is that I have a subset of the movements of material of a factory (over 700k rows), and I want to separate these movements by the reference of each product to plot the stock of each product ...
2
votes
0answers
29 views

Modularizing matplolib graphing based on a data dictionary

For plotting I often use a dictionary that contains my data of interest, regarding my numerical simulations. For example I have a numpy array let's call it ...
2
votes
0answers
91 views

GUI to control a NZXT cooling and lighting system

I am working since a couple of weeks on my first Python application and I would love to have a review of the code I wrote so far. The app has the purpose of controlling the cooling and lighting of an ...
2
votes
0answers
32 views

Function that plots data frames, supporting several variants

I defined a function that generates tables and creates countplots and barplots based on the arguments that it receives. But the snippets of code inside the function are repeated several times, which ...
2
votes
0answers
54 views

Time-dependent state machine with two outputs

Given a class BasicDataFeed whose purpose is to feed questions and answers into an artificial neural network, which is tested in a non-negotiable manner as follows: ...
2
votes
0answers
184 views

Increase Matplotlib performance of redrawing

I have written an error analyzer in Python for the product of our company. I want to read the log from our device and parse it, On Y axis there are different components of the device, and on X axis ...
2
votes
0answers
43 views

MCMC Metropolis Hastings for German Tank Puzzle

I have implemented the following MCMC algorithm for the german tank puzzle found here I just want to make sure everything is legit and that I am not getting the right answer by chance. ...
1
vote
0answers
22 views

Parsing and plotting with numpy (or pandas)

I am trying to improve the following code to make it more broadly applicable and quick to use. ...
1
vote
0answers
68 views

Live plot with many subplots

I have a stream of sensor data which I want to visualize in a plot with many subplots. Plotting the data is a real bottleneck in my code. Right now I get with small resolution only 16 FPS which is far ...
1
vote
0answers
1k views

Applying Model-View-Controller to Tkinter/matplotlib Application

I'm a novice programmer. I am preparing to refactor a large project of mine to follow a model/view/controller design pattern, with separate modules for each (and eventually separate modules for the ...
1
vote
0answers
2k views

Barrier Option Pricing using Python

This is my implementation of pricing an exotic option (in this case an up-and-in barrier option) using the Monte Carlo simulation in Python. I use NumPy where I can. Any ideas to optimize this code? <...