I move 1 along the x-axis, then rotate by an angle theta, I move 1/phi, rotate by theta, I move 1/phi², rotate by theta etc etc.
Made with #python #numpy #matplotlib
I move 1 along the x-axis, then rotate by an angle theta, I move 1/phi, rotate by theta, I move 1/phi², rotate by theta etc etc.
Made with #python #numpy #matplotlib
I usually do not ask chatgpt, but today after a long search for something on the internet I tried my luck. The result is the most crappy, useless thing I read in a while.
So, does anyone here know if I can embed a SVG/PDF plot as a #matplotlib axis, and how? :)
Dive into a GRASS tutorial!
Discover how to create plots directly in GRASS using tools powered by the matplotlib library. No conversion needed! Visualize your raster, vector, and time series data effortlessly. Check it out and give it a try!
#Tutorial #DataVisualization #GRASS #GIS #Python #Matplotlib
https://grass-tutorials.osgeo.org/content/tutorials/good_looking_plots/good_looking_plots_in_grass.html
https://grass-tutorials.osgeo.org/content/tutorials/good_looking_plots/good_looking_plots_in_grass.html
Not sure if I will use it for anything, but it was fun to make!
#matplotlib fun under #python #67
#! /usr/bin/python3
import matplotlib.pyplot as plt
import numpy as np
X,Y = np.meshgrid(np.linspace(-4,4,512),np.linspace(-4,4,512))
Z=(1-X/2+X**4+Y**3)*np.exp(-X**2-Y**2)*(1-X/3-Y**4)*(3-Y+X**2)
levels=np.linspace(np.min(Z),np.max(Z),20)
fig,ax=plt.subplots()
ax.contour(X,Y,Z,levels=levels)
plt.show()
Debugging a complex Python library via a Jupyter notebook is unfairly good tech, yinz.
Now that I've tried it, I can't go back.
My favorite part of this exercise?
Testing the fix in-place by copying the broken method out of the class, editing it, monkey-patching it back into the class definition, and then re-running the small verification setup I threw together in Jupyter. Newly-created class instances are using the new method and the flow goes from "Busted" to "Working."
(Plus, Jupyter supports matplotlib output, which is huge when what I'm debugging is fundamentally geometric in nature).
Seeking recommendations for a #WebMapping tutorial / course?
Slightly at sea on where to start.
- My current JS skill level is _extreme novice_.
- I don't have access to ArcGIS.
- Comfortable with #QGIS [*] and the #python #geospatial ecosystem (#geopandas #xarray #rasterio and plotting with #matplotlib)
Suggestions welcome. TIA.
* I have looked at the qgis2web plugin, but having some issues associated with my aged laptop (2012 mbp running Ubuntu) and a 'Wayland session'.
In the second and final part of my series Exploring the Visible Spectrum with Python I plot the wavelengths, frequencies and energies of the colours of visible light using Matplotlib.
#python #pythonprogramming #programming #light #spectrum #physics #matplotlib
Weekend viz. Marvel money tree showing box office sales by film and series.
Avengers are the most succesful series in in terms of box office sales with Avengers: End Game on top ($2,797m). Captain Marvel is the most succesful standalone film ($1,129m).
Data from Information is Beautiful (up until Jun 2023). Visual made 100% in #python #matplotlib.
Full code here (not pretty though ) https://github.com/Lisa-Ho/small-data-projects/blob/main/README.md#032025-marvel-money-tree
"Plotando estatísticas básicas com #Polars e #Matplotlib - #NLP 04 " @dunossauro #Python
https://www.youtube.com/watch?v=4HpSFIekqDw
Hoje eu aprendi uma ideia ótima do Dunossauro que é imaginar que o ax do fig, ax do matplotlib (axis/eixo) é como uma haste onde penduramos as coisas! Como é fundamental o trabalho dele pra nossa comunidade.
Update: inicialmente achei que era uma tradução corrente mas ele me explicou que não.
Only today found out that there’s a built-in function for labeling bars in Matplotlib.
It's been there since version 3.4. of Matplotlib, out in 2021
https://matplotlib.org/stable/gallery/lines_bars_and_markers/bar_label_demo.html#sphx-glr-gallery-lines-bars-and-markers-bar-label-demo-py
#Matplotlib
Did anyone here have trouble with #uv using a #Python build that breaks interactive #matplotlib and/or #tkinter? I think it might be breaking #FreeSimpleGUI too :(
https://github.com/astral-sh/uv/issues/6893
Update: Also https://github.com/astral-sh/python-build-standalone/issues/146
@futurebird I've found that in my own basic computing I do everything in #Jupyter notebooks these days - working out and documenting whatever I'm doing cell by cell, examining and displaying data, plotting stuff, etc.
I suspect that this might be a fantastic way to teach CS - teaching just enough #Python, #Matplotlib, #Markdown, etc. to use notebooks as a go-to tool for just *doing* stuff (especially exploring data).
Whether iteratively developing a tool, exploring data, physics, math, etc.
Just over halfway done with the Wijk aan Zee tournament. Here's a graph of how things have progressed so far. It's a three way tie at the top.
If you have been using #py5 for a while, this page about #matplotlib integration is a documentation gem It opens up the possibility of making "live", real time and interactive, maplotlib charts, but even if you are not into #dataviz, it shows the beautiful #profiling tools integrated with py5 and how to use #threading to improve performance. In the end you also learn about named colors and the clever "Colormap Color Mode" feature.
https://www.py5coding.org/integrations/matplotlib.html #python #processing4 #profilers #colormapps
On a mapping run - Bauhaus inspired grid map of europe. Each country is coloured by the first letter of their ISO name.
Maybe a little puzzle to figure out the grid I used
Initial map made in #python using #matplotlib then refined in Figma. Code: https://github.com/Lisa-Ho/small-data-projects/tree/main?tab=readme-ov-file#012025-grid-map-of-europe
#gnuplot is great. I've been feeding the results of #sqlite queries into it via org-babel, and it works almost perfectly; the only exception being that I can't use column names in the gnuplot dataset.
Maybe I'll write a blog post about that... In some moderately distant future.
It feels much less accessible compared to #matplotlib, but not more so than #emacs, I guess. And it's great not to carry any dependencies except the gnuplot library, particularly for the Org Mode use case.
The charts sometimes look like a hello from the 90s, but to me it's a plus that they don't give the "matplotlib on defaults" vibe which is omnipresent in modern science :D
Mastodon.social alt text analysis report!
Me and my friend Cristal just published a report on image description usage on mastodon.social, as a group project for the Introduction to Data Science course of the Artificial Intelligence and Sustainable Societies Erasmus Mundus Joint Master program.
Thoughts and feedback are welcome
A huge thanks to @stefan for publishing the dataset on which we based our analysis!
NOTE: We are absolutely aware that the report has very little actual relevance, as the dataset contains a super limited amount of posts from one instance only. It was mainly an experimentation to test our data analysis skills.
@shauvikkumar I find this poll a bit difficult to answer, as the mentioned libraries can all be important parts of data science pipelines at the same time. What if I want to perform algorithmic computations with #SciPy by using #pandas via #numpy arrays and visualize the results afterward with #matplotlib for example?
I don’t have Spotify, but I use Strava. So I created my personal Year in Sports Wrapped
Got Strava and want your own? No problem, I turned it into an app https://year-in-sports.streamlit.app/
Step 1: Download your data from Strava. Follow their guide on how to do it: https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export
Step 2: Upload your csv file, chose a year and create your visual.
App made in #python using #streamlit, #matplotlib, #pyfonts, and a few more libraries.
Full code: https://github.com/Lisa-Ho/year-in-sports