Mit den #opendata Wetterdaten des @DeutscherWetterdienst unter https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/daily/solar/ kann man die Sonnenscheindauer gegen die Unfallzahlen plotten. #matplotlib #python #fedibikes
Mit den #opendata Wetterdaten des @DeutscherWetterdienst unter https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/daily/solar/ kann man die Sonnenscheindauer gegen die Unfallzahlen plotten. #matplotlib #python #fedibikes
Finding all regions defined by a set of pseudorandom circles. Here, 8 input circles gave 37 output regions.
Python using pyclipper for 2d predicates & matplotlib for display. The (probably inefficient and maybe wrong) algorithm for ensuring all regions are found by me using trial and error.
pssst don't tell anyone but the circles are actually just 360-gons.
More of a general question about community. I want to draw a pie plot, in a package/rendering engine that is not #matplotlib . But I know that matplotlib does do the math I need.
Theoretically, the "correct" approach would be to isolate that math, make a new package and hook it in so that both matplotlib and my new package can now use the same math, same package. I can reuse the math I need without their rendering assumptions.
But I don't think they would do this. (1/2) ...
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
#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).
Jebus.. #Python and all it's batteries. So #Matplotlib knows how to talk #SVG already. I just started to speculate on how hard that would be to implement and.. it's already there built into Matplotlib.
Well. That worked out rather nicely then.
Being back working in Python feels way too magical at times.
Turns out the mechanisms I'd already put in can do graphs and plots already with clean readable markdown - no new plumbing needed.
I'd have thought that a far-fetched goal moments ago.
@peterdrake @mkj @jitseniesen @apa
Well, I confirmed that the bizarro text at the top of the Y axis is not in fact part of the Y axis. If you set the style of the Y axis tick labels to plain, so it doesn't use scientific notation:
>>> plt.ticklabel_format(axis="y", style="plain")
... that one bizarro value is still shown in scientific format.
I don't recall if matplotlib supports multiple scales/sets of ticks on an axis, so I'm not sure where that value is coming from. I looked at the data generated by your code and didn't see anything weird.
I think you need either a matplotlib expert, or a user discussion group. Or at least someone who's used matplotlib more recently than the Clinton administration...
Played around a little bit with #numpy and #matplotlib in #python to create a #cyberpunk #voxelart avatar featuring a #c64 #geos disk icon. #procrastination
I plotted a graph with some very small numbers. The scale of the vertical axis is listed as "1e-5+5.802e-1". What does this mean? I understand scientific notation, but not a sum of two numbers in this context. Where do the invisible parentheses go?
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'.
Included some #matplotlib in a #livecoding performance! Who said that #python cannot be used?
Music by @TodePond
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
Here are the other two graphs. If you want to see my work, I put the Jupyter notebook up on Github. It's not great code, but I wanted to show something before I have to travel again.
https://gist.github.com/kbob/076e41fd5a251f2e7f2b3af3591d283c
I've been traveling, so I've not been playing with ESP32s. But here are some graphs that show the raw fan tach data. (Five, split across two posts)
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.
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
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
Nom.
https://fediscience.org/@tlohde/113412191058419280
@tlohde - Croissant Distribution
or, where am I most likely to have my next croissant, assuming (something something) independence from my previous croissant. ^k * e^(-
) / k!
--
2d kernel density estimation of the location of bakeries (blue) and farms (red) across France.
Locations taken from OpenStreetMap, with #osmnx & plotted with #matplotlib & #seaborn. font: Borel, by Rosalie Wagner.
#30DayMapChallenge Day 2: Lines
Croissant Distribution
or, where am I most likely to have my next croissant, assuming (something something) independence from my previous croissant. ^k * e^(-
) / k!
--
2d kernel density estimation of the location of bakeries (blue) and farms (red) across France.
Locations taken from OpenStreetMap (considered paying attention to the size of the farm, but didn't), with #osmnx & plotted with #matplotlib & #seaborn. font: Borel, by Rosalie Wagner.
#30DayMapChallenge Day 2: Lines