TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: PlotAI – Create Plots in Python and Matplotlib with LLM

51 点作者 pplonski86超过 1 年前

6 条评论

westurner超过 1 年前
Vega and Vega-lite visualization grammars: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Vega_and_Vega-Lite_visualisation_grammars" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Vega_and_Vega-Lite_visualisati...</a><p>FWIU Vega&#x2F;voyager suggests similar charts with CompassQL: <a href="https:&#x2F;&#x2F;github.com&#x2F;vega&#x2F;voyager">https:&#x2F;&#x2F;github.com&#x2F;vega&#x2F;voyager</a><p>From <a href="http:&#x2F;&#x2F;vega.github.io&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;vega.github.io&#x2F;</a> re: CompassQL:<p>&gt; <i>COMPASSQL is a visualization recommendation engine. Given user query, it suggests visualizations, ranked by both data properties and perceptual principles</i><p>Altair is one implementation of Vega-lite in Python; for rendering charts with JS.<p>mpld3 does matplotlib with d3.js: <a href="https:&#x2F;&#x2F;github.com&#x2F;mpld3&#x2F;mpld3">https:&#x2F;&#x2F;github.com&#x2F;mpld3&#x2F;mpld3</a>
bfeynman超过 1 年前
Again, just a trivial wrapper over open ai, which already does this very well. But seems to not have any real benefits other than not needing to move mouse. You don&#x27;t need to send data to OpenAI, and in a business you wouldn&#x27;t want to do that. LLMs already generate synthetic data for graphing that you just copy&#x2F;paste in and use. It should instead be passing in types and header maybe.<p>The big thing for graphs is formatting, the ideal solution IMO is one that can JIT code gen parts that generate real code for formatting so you can reuse and tweak, I don&#x27;t need to pay to send request to increase the marker size by one pixel. Even if running locally that&#x27;s waste of compute
lappa超过 1 年前
This is great! If I could suggest changes that would make this especially useful for me and likely others it would be<p>1) The ability to substitute in your own LLM, specifically I&#x27;d like to be able to use Code Llama which was released a few days ago.<p>2) The ability to automatically determine an appropriate plot type based on natural langugae metadata. This would allow me to bulk process labelled timeseries data. For example if I set the X label as date, it should know to make a line chart. If I present data labelled with a description involving as &quot;percent of&quot; or something the LLM should know to use a pie or bar chart. If I give a description involving quarterly revenue, it should know it&#x27;s a time series, but with discrete values, so a bar chart with negative and positive values, etc.
pplonski86超过 1 年前
The easiest way to create plots in Python and Matplotlib. The plotai is using LLM to generate code and plots.<p>The idea:<p>1. User provides input DataFrame and prompt.<p>2. The PlotAI constructs a prompt for LLM, which contains the first 5 rows of DataFrame and the user&#x27;s prompt and asks for Python code as output.<p>3. Returned Python code is executed, and the plot is displayed.<p>The simplest possible API for plotting:<p><pre><code> # import packages import pandas as pd from plotai import PlotAI # create some data df = pd.DataFrame({&quot;x&quot;:[1,2,3], &quot;y&quot;: [4,5,6]}) # do a plot plot = PlotAI(df) plot.make(&quot;scatter plot&quot;) </code></pre> The PlotAI class has only one method, make().<p>It works in Python scripts and in notebooks (Jupyter, Colab, VS Code).
评论 #37262554 未加载
JPKab超过 1 年前
Hey dude!<p>I met you a long time ago when you came to Colorado from Europe to demo mljar to a potential acquisition.<p>My employer at the time was potentially interested in buying mljar, but I was overruled and they passed on you. It was a bad decision and I&#x27;m glad to see you&#x27;re doing cool things now.
评论 #37272314 未加载
jncfhnb超过 1 年前
I have never seen someone pass a triple quote string as an argument before like in the demo mp4.
评论 #37263074 未加载
评论 #37263364 未加载
评论 #37264520 未加载