toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

218
active users

#matplotlib

0 posts0 participants0 posts today

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.

#python

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

grass-tutorials.osgeo.org/cont
grass-tutorials.osgeo.org/cont

grass-tutorials.osgeo.orgMaking plots with GRASS

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.

Replied to Peter Drake

@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... 😉

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

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 😁 ) github.com/Lisa-Ho/small-data-

"Plotando estatísticas básicas com #Polars e #Matplotlib - #NLP 04 " @dunossauro #Python

youtube.com/watch?v=4HpSFIekqD

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.