<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anthony Sung</title>
    <description>The latest articles on DEV Community by Anthony Sung (@yueswater).</description>
    <link>https://dev.to/yueswater</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3834574%2Fe9ff74c1-a4ff-45fa-b16d-d4327b0c0d32.png</url>
      <title>DEV Community: Anthony Sung</title>
      <link>https://dev.to/yueswater</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yueswater"/>
    <language>en</language>
    <item>
      <title>Stop Fighting Matplotlib for Economics Charts: econ-viz Is Your Friend</title>
      <dc:creator>Anthony Sung</dc:creator>
      <pubDate>Tue, 31 Mar 2026 05:11:46 +0000</pubDate>
      <link>https://dev.to/yueswater/stop-fighting-matplotlib-for-economics-charts-econ-viz-is-your-friend-5a5d</link>
      <guid>https://dev.to/yueswater/stop-fighting-matplotlib-for-economics-charts-econ-viz-is-your-friend-5a5d</guid>
      <description>&lt;p&gt;If you’ve ever tried to draw a simple microeconomics graph—say, an indifference curve tangent to a budget constraint—using raw Python or LaTeX, you know the struggle. You spend hours tweaking axis limits, hiding grids, calculating exact tangency points, and trying to align multiple subplots.&lt;/p&gt;

&lt;p&gt;I got tired of doing this manually for my teaching materials, so I built &lt;code&gt;econ-viz&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;With our latest major update, it goes from being "a cool wrapper" to a "production-ready tool for economics lectures and papers." Here is how it solves the biggest headaches in drawing economics charts:&lt;/p&gt;

&lt;h4&gt;
  
  
  Elegant Multi-Panel Layouts
&lt;/h4&gt;

&lt;p&gt;I’ve introduced a new &lt;code&gt;Figure&lt;/code&gt; class that handles standard economic layouts out-of-the-box. Whether you need side-by-side, stacked, or 2x2 comparisons, you can generate them cleanly without fighting &lt;code&gt;matplotlib.gridspec&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  The &lt;code&gt;DemandDiagram&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Showing the derivation of the Marshallian demand curve requires stacking the utility space directly above the price-quantity space. &lt;code&gt;econ-viz&lt;/code&gt; now perfectly aligns the axes and automatically links the tangency points on the indifference curves to the points on the demand curve below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi71paxzn1x42pt40bjw3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi71paxzn1x42pt40bjw3.png" alt=" " width="800" height="1652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnbvk4xjbtiqijoq7u6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnbvk4xjbtiqijoq7u6i.png" alt=" " width="800" height="1652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5a2k68jnwq26scnc6z35.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5a2k68jnwq26scnc6z35.png" alt=" " width="800" height="1652"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Analytical Tools
&lt;/h4&gt;

&lt;p&gt;It doesn't just draw; it solves. I've added new features to support your analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;solution_tex&lt;/code&gt;: Outputs the optimal solutions in clean LaTeX format.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;comparative_statics&lt;/code&gt;: Easily perform and visualize comparative statics.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;slutsky_matrix&lt;/code&gt;: Computes the Slutsky matrix for deeper demand analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Mission
&lt;/h3&gt;

&lt;p&gt;My goal with this open-source project is simple: &lt;strong&gt;Economists, educators, and students should spend their time analyzing models, not hand-coding chart coordinates.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are teaching microeconomics, writing notes, or publishing papers, give it a try!&lt;/p&gt;

&lt;p&gt;📖 &lt;strong&gt;Documentation:&lt;/strong&gt; &lt;a href="//econ-viz.org"&gt;econ-viz.org&lt;/a&gt;&lt;br&gt;
🐙 &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/EconViz/econ-viz" rel="noopener noreferrer"&gt;github.com/EconViz/econ-viz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have a specific economics chart that is currently a nightmare to draw, drop a comment below or open an issue on GitHub! Happy plotting!&lt;/p&gt;

</description>
      <category>python</category>
      <category>matplotlib</category>
      <category>productivity</category>
      <category>startup</category>
    </item>
    <item>
      <title>d</title>
      <dc:creator>Anthony Sung</dc:creator>
      <pubDate>Fri, 20 Mar 2026 04:00:50 +0000</pubDate>
      <link>https://dev.to/yueswater/d-41k</link>
      <guid>https://dev.to/yueswater/d-41k</guid>
      <description>&lt;p&gt;d&lt;/p&gt;

</description>
      <category>d</category>
    </item>
  </channel>
</rss>
