4 ms·
TIL you could make xkcd-like plots with matplotlib
- rekttrader 3y agoimport antigravity
- kristopolous 3y agois that how he does it? I wouldn't be surprised.
- zshrdlu 3y agoI would be. It's much quicker to draw this than to write code for it.
- waveBidder 3y agoOTOH, not behavior from randal Monroe that would be surprising.
- baumschubser 3y agohttps://xkcd.com/1205/ https://xkcd.com/1205/
- mbreese 3y agoThere is also an R package to do the same thing as a ggplot theme: https://xkcd.r-forge.r-project.org/ https://xkcd.r-forge.r-project.org/
- asicsp 3y agoRelated: Xkcd-Style Plots in Matplotlib https://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-in-matplotlib/ https://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-i... (discussion: https://news.ycombinator.com/item?id=19293129 https://news.ycombinator.com/item?id=19293129) XKCD Plots in Matplotlib: Going the Whole Way https://jakevdp.github.io/blog/2013/07/10/XKCD-plots-in-matplotlib/ https://jakevdp.github.io/blog/2013/07/10/XKCD-plots-in-matp... (https://news.ycombinator.com/item?id=11642344 https://news.ycombinator.com/item?id=11642344)
- mr_mitm 3y agoAlso, this: https://mathematica.stackexchange.com/questions/11350/xkcd-style-plots https://mathematica.stackexchange.com/questions/11350/xkcd-s...
- angry_moose 3y agoFun plot style, but the "noise" is too regular to really look right. Seems like like it basically just superimposes a sine wave onto all the straight lines. Compare the axes of the plots, or the vertical lines on the bar chart which have a pretty distinct periodicity, to the original: https://xkcd.com/373/ https://xkcd.com/373/
- robbomacrae 3y agoYes that's my take. I think its good enough for most use cases but if you really wanted that random effect you might consider replacing the lines using something like an ipad and pencil or stylus.
- francios_de 3y ago> but the "noise" is too regular to really look right They probably did add the randomness (haven't checked nor confirmed), but it could be the higher resolution that makes it look really clear.
- mock-possum 3y agoYeah more wavy than scribbly
- robbomacrae 3y agoShameless plug but this is exactly how I put together the graphs in my blog post[0]. It's very easy to use and surprisingly versatile although I did add a bit of photoshopping to get things exactly as I wanted them. [0] https://summer.ai/blog https://summer.ai/blog ChatGPT should be your first cofounder
- cmcaleer 3y agoWhile I'm not a fan of the plot style, I use the xkcd colors from matplotlib.colors.XKCD_COLORS all the time. 954 colors named from the xkcd color survey [0]. [0] https://xkcd.com/color/rgb/ https://xkcd.com/color/rgb/
- mr_mitm 3y agoDo we really need "baby poop green" and "baby shit green" though?
- Maledictus 3y agoYes
- rented_mule 3y agoI've used this for documenting concepts where I don't want people getting bogged down in trying to glean precise relationships from the plots, just general ideas. People have also commented that it made some deeply technical documentation more approachable because it felt less formal.