TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Tiny Grammar of Graphics

240 pointsby pavpanchekhaalmost 3 years ago

10 comments

vavooomalmost 3 years ago
A larger, more detailed introduction to this topic is best discussed by Hadley Wickham in his seminal paper &quot;A Layered Grammar of Graphics&quot;.<p><a href="https:&#x2F;&#x2F;byrneslab.net&#x2F;classes&#x2F;biol607&#x2F;readings&#x2F;wickham_layered-grammar.pdf" rel="nofollow">https:&#x2F;&#x2F;byrneslab.net&#x2F;classes&#x2F;biol607&#x2F;readings&#x2F;wickham_layer...</a><p>Wickham is the Chief Scientist at RStudio and created R packages such as ggplot2 and the tidyverse.
评论 #31744897 未加载
评论 #31746172 未加载
lo5almost 3 years ago
H2O Wave has a similar (probably tinier) Grammar of Graphics API: <a href="https:&#x2F;&#x2F;wave.h2o.ai&#x2F;docs&#x2F;plotting" rel="nofollow">https:&#x2F;&#x2F;wave.h2o.ai&#x2F;docs&#x2F;plotting</a><p>Leland Wilkinson (GoG inventor) and I designed it together a couple of years back.<p>The function for creating marks (a layer) tries to be as &quot;flat&quot; as possible, in the sense that it should be possible to render most common kinds of plots without having to pass nested&#x2F;hierarchical options: <a href="https:&#x2F;&#x2F;wave.h2o.ai&#x2F;docs&#x2F;api&#x2F;ui#mark" rel="nofollow">https:&#x2F;&#x2F;wave.h2o.ai&#x2F;docs&#x2F;api&#x2F;ui#mark</a>
dhucerbinalmost 3 years ago
I’ve been building data visualizations for web for almost ten years. Most of the time it was some kind of dashboard with custom charts, interactivity and of course brand look.<p>Grammar of graphics always was this North Star for me. It is very helpful to go through papers and books and search for inspiration how to organize your system. But direct implementations are finicky to work with. And in my hubris I attempted to write yet another one implementation of grammar of graphics and it resulted in exactly the same problems! With complex marks it is ambiguous what is a data point and what is a series. Tuning looks require this configuration objects scattered around chart definition and composition sometimes require to inject something in two different parts of definition.<p>Now I treat grammar of graphics as this collection of patterns and good practices. But surrender to pragmatic solutions when necessary.<p>Anyway I think I owe big part of my career to works of Wickham and Wilkinson.
评论 #31746686 未加载
woevdbzalmost 3 years ago
I&#x27;m really curious how Observable will fare in the VC bear market. They seem to be a fantastic team of conceptual thinkers but I&#x27;m not sure what the cash flow looks like for this kind of tooling
评论 #31748268 未加载
skybrianalmost 3 years ago
I&#x27;ve been having fun using Observable Plot to graph various things related to digital signal processing. Here are my notes. Feedback welcome!<p><a href="https:&#x2F;&#x2F;observablehq.com&#x2F;collection&#x2F;@skybrian&#x2F;digital-signal-processing" rel="nofollow">https:&#x2F;&#x2F;observablehq.com&#x2F;collection&#x2F;@skybrian&#x2F;digital-signal...</a>
forrestthewoodsalmost 3 years ago
I am ever increasingly a fan or just manually generated SVG. Creating DSL abstraction layer on top is fine, I guess. But ultimately I know what I want and it’s easier to just make it directly instead of fighting a tool to try and induce it to make the thing I want.<p>That said, I’m weird. My blog is artisinally hand crafted HTML, JS, and CSS for the same reason.
评论 #31748422 未加载
评论 #31748945 未加载
thedudeabides5almost 3 years ago
Relevant, the OG Bertin&#x27;s Matrix Theory of Graphics<p><a href="http:&#x2F;&#x2F;www.geo-informatie.nl&#x2F;courses&#x2F;grs60312&#x2F;visualisation&#x2F;files&#x2F;bertin_matrixtheory_2001.pdf" rel="nofollow">http:&#x2F;&#x2F;www.geo-informatie.nl&#x2F;courses&#x2F;grs60312&#x2F;visualisation&#x2F;...</a>
评论 #31746769 未加载
rpowersalmost 3 years ago
The thing I hate about all of these GoG approaches is the wastefulness of the translation of data + style into visual representations. For example, if you have a dashboard with 8+ charts visible, the scaffolding of the charting library starts to weigh down the system in both performance and memory usage. VegaLite, especially, seems to make a copy of the data being passed in. Looking at the examples of ObservablePlot, I can see more wasteful processing in the form of dataset.map(d =&gt; d.property) sprinkled in several places.
评论 #31747368 未加载
评论 #31759062 未加载
评论 #31747614 未加载
tpoacheralmost 3 years ago
I never quite got the allure of this &quot;grammar of graphics&quot; business. I mean, I think I &quot;get it&quot;, but I don&#x27;t get it.<p>For me GoG is basically &quot;use ggplot2 instead of base R plotting libraries when in R&quot;.<p>Which is fine and all, but graphing utilities of matlab&#x2F;octave are far simpler&#x2F;flexible.<p>ggplot2 to me seems like it feels it has to add a layer of complexity to achieve the &quot;grammar&quot; part, without a real practical benefit over matlab etc.
jackallisalmost 3 years ago
Boy, as newbie tyring to learn DV is really confusing these days when it comes to picking a platform - R, Pythong DJ3, Obervablehq.
评论 #31745330 未加载
评论 #31750250 未加载
评论 #31746460 未加载