All Questions
Tagged with numpy matplotlib
52
questions
1
vote
1
answer
42
views
Plotting determinant probabilities
This is a fun exercise that tries to answer the following question: if the elements from a square matrix are randomly chosen from 0 to 9, is it more like that the determinant would be even or odd?
I'm ...
1
vote
0
answers
296
views
A collection of Python functions that fill a given region with rectangles
These are what I was working on in the last few days, I wrote a bunch of functions that fill a given region with rectangles of different colors.
The functions can:
Randomly split a region into sub ...
6
votes
1
answer
385
views
Calculating quantiles of timeseries data and then create a "fanplot"
My code is working properly, but I am looking for better approach in the calculation of quantiles and the finding of the data in the dataframe.
...
3
votes
1
answer
230
views
Collatz conjecture with plots
I have an assignment where I write a Collatz Conjecture program for a series of starting values from 1 to N and make two plots: number of iterations vs starting value and computed numbers vs starting ...
4
votes
1
answer
402
views
Path of a particle in a non-uniform B field
I have completed my project which simulates the path of a particle trapped in a device known as a magnetic mirror. I would like your thoughts and improvements on my implementation.
Here is the code:
<...
2
votes
1
answer
727
views
Implementing histogram in python
I was trying to implement my own version of matplotlib's hist function and I came up with this:
...
1
vote
1
answer
46
views
Removing Loop from Numpy XOR
I have been playing around with numpy and matplotlib.
My little project was to create a scatter plot ranging from -1 to 1 on both X and Y, but where the shading is done with the XOR scheme.
The ...
2
votes
2
answers
106
views
Downloading COVID data and uploading graphs
So this is a project I have been working on for the last few weeks. Just started learning Python. Started out with bash scripting and got the itch to learn more. Anyway code fetches covid-19 data from ...
2
votes
1
answer
52
views
Hardware driven data processing and ploting in need of better control flow
This is code for a measurement setup that receives a steady stream of UDP data, finds the trigger in one channel and operates on the data in the other channel to enhance the signal and remove noise, ...
1
vote
0
answers
33
views
Spectrograph using array-of-slice-references
I've written a working and complete proof of concept that shows a spectrograph in Matplotlib. I want to nail down this proof of concept before I continue with development, and I'm not thrilled with ...
1
vote
1
answer
107
views
TicTacToe: If an error messages do not appear straight away
I am fairly new to Python and have tried to create a tic tac toe game that is completely automatic, where you can see if a player1 has an advantage if you let it ...
2
votes
0
answers
24
views
Getting Graph and Block Animation to Run Smoothly Together
I have been working on some code that produces a live graphic of a graph and blocks moving. It works in theory but does not look like how I want. The animation runs very slow when showing both the ...
5
votes
1
answer
277
views
Jupyter notebook style help + code suggestions for pandas
I wanted to open source some code to scrape and analyze publicly-filed stock buys and sells from U.S. senators. I'm not familiar with code style for Jupyter notebooks or pandas in general. Would it be ...
2
votes
0
answers
80
views
Profiling for Bézier curve calculations
Recently I posted an answer on a question about Bézier curve calculations. As a micro-synopsis: there are three implementations of De Casteljau's algorithm here, including the original poster's, AJ ...
8
votes
3
answers
799
views
Modifying Titration Data analysis results
This is my first script that I've written. As a result, I'm sure there are extra lines that are unneeded, or maybe better more concise ways of doing things than I have done here. I have tried to add ...