<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Visualization | Haobin Tan</title><link>https://haobin-tan.netlify.app/tags/visualization/</link><atom:link href="https://haobin-tan.netlify.app/tags/visualization/index.xml" rel="self" type="application/rss+xml"/><description>Visualization</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sun, 23 Jan 2022 00:00:00 +0000</lastBuildDate><image><url>https://haobin-tan.netlify.app/media/icon_hu7d15bc7db65c8eaf7a4f66f5447d0b42_15095_512x512_fill_lanczos_center_3.png</url><title>Visualization</title><link>https://haobin-tan.netlify.app/tags/visualization/</link></image><item><title>Matplotlib Getting Started</title><link>https://haobin-tan.netlify.app/docs/coding/python/visualization/matplotlib-getting-started/</link><pubDate>Mon, 31 Aug 2020 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/docs/coding/python/visualization/matplotlib-getting-started/</guid><description>&lt;p>View in &lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/tree/master/Matplotlib/">nbviewer&lt;/a>:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/00-Visualization_with_Matplotlib.ipynb">Visualization with matplotlib&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/01-Simple_line_plots.ipynb">Simple line plots&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/02-Simple_Scatter_Plots.ipynb">Simple scatter plots&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/03-Visualizing_Errors.ipynb">Visualizing errors&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/04-Density_and_Contour_Plots.ipynb">Density and contour plots&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/05-Histograms_Binning_and_Density.ipynb">Histograms, binning and density&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/06-Customizing_Plot_Legends.ipynb">Customizing plot legend&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/07-Customizing_Colorbars.ipynb">Customizing colorbars&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/08-Multiple_Subplots.ipynb">Multiple subplots&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/09-Text_and_Annotation.ipynb">Text and annotation&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/10-Customizing_Ticks.ipynb">Customizing tricks&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/11-Configurations_and_Stylesheets.ipynb">Configuration and stylesheets&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/12-3D_plot.ipynb">3D plots&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nbviewer.jupyter.org/github/EckoTan0804/Summary-data_science_handbook/blob/master/Matplotlib/13-Seaborn.ipynb">Seaborn&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Plotly</title><link>https://haobin-tan.netlify.app/docs/coding/python/visualization/plotly/</link><pubDate>Mon, 31 Aug 2020 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/docs/coding/python/visualization/plotly/</guid><description>&lt;h2 id="dash">Dash&lt;/h2>
&lt;p>&lt;img src="https://raw.githubusercontent.com/EckoTan0804/upic-repo/master/uPic/images.png" alt="Numfocus - Plotly Dash Logo - 1176x528 PNG Download - PNGkit">&lt;/p>
&lt;p>&lt;a href="https://plot.ly/products/dash">Dash&lt;/a>, a member of Plotly’s open-source tools, is a Open Source Python library for creating &lt;strong>reactive, Web-based&lt;/strong> applications. Dash is a user interface library for creating analytical web applications. Those who use Python for data analysis, data exploration, visualization, modelling, instrument control, and reporting will find immediate use for Dash.&lt;/p>
&lt;h3 id="why-is-dash-good">Why is Dash good?&lt;/h3>
&lt;ul>
&lt;li>Dash app code is &lt;strong>declarative&lt;/strong> and &lt;strong>reactive&lt;/strong>, which makes it easy to build complex apps that contain many interactive elements.&lt;/li>
&lt;li>Every aesthetic element of the app is customizable&lt;/li>
&lt;li>While Dash apps are viewed in the web browser, you do NOT have to write any Javascript or HTML. Dash provides a Python interface to a rich set of interactive web-based components.&lt;/li>
&lt;li>Dash provides a simple reactive decorator for binding your custom data analysis code to your Dash user interface.&lt;/li>
&lt;li>Through these two abstractions — Python components and reactive functional decorators — Dash abstracts away all of the technologies and protocols that are required to build an interactive web-based application.&lt;/li>
&lt;/ul>
&lt;p>Dash is simple enough that you can bind a user interface around your Python code in an afternoon. &amp;#x1f44f;&lt;/p>
&lt;h3 id="architecture">Architecture&lt;/h3>
&lt;h4 id="frontend-and-backend">Frontend and backend&lt;/h4>
&lt;p>Dash leverages the power of Flask and React, putting them to work for Python data scientists who may not be expert Web programmers.&lt;/p>
&lt;ul>
&lt;li>Dash applications are web servers running &lt;strong>&lt;a href="http://flask.pocoo.org/">Flask&lt;/a>&lt;/strong> and communicating &lt;strong>JSON&lt;/strong> packets over HTTP requests.&lt;/li>
&lt;li>Dash’s frontend renders components using &lt;strong>React.js&lt;/strong>
&lt;ul>
&lt;li>Dash components are Python classes that encode the properties and values of a specific React component and that serialize as JSON.&lt;/li>
&lt;li>The full set of HTML tags, like &lt;code>&amp;lt;div/&amp;gt;&lt;/code>, &lt;code>&amp;lt;img/&amp;gt;&lt;/code>, &lt;code>&amp;lt;table/&amp;gt;&lt;/code> are also rendered dynamically with React and their Python classes are available through the &lt;code>dash_html_component&lt;/code> library.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h4 id="css">CSS&lt;/h4>
&lt;p>CSS and default styles are kept out of the core library for modularity, independent versioning, and to encourage Dash App developers to customize the look-and-feel of their apps.&lt;/p>
&lt;h4 id="data-visualization">Data Visualization&lt;/h4>
&lt;p>Dash ships with a Graph component that renders charts with &lt;a href="https://github.com/plotly/plotly.js">plotly.js&lt;/a>.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>built on top of D3.js (for publication-quality, vectorized image export) and WebGL (for high performance visualization)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>declarative, open source, fast&lt;/p>
&lt;/li>
&lt;li>
&lt;p>supports a complete range of scientific, financial, and business charts.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Dash’s Graph element shares the same syntax as the open-source &lt;a href="https://plot.ly/python">plotly.py&lt;/a> library, so you can easily to switch between the two.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="open-source-repositories">Open Source Repositories&lt;/h4>
&lt;ul>
&lt;li>Dash backend: &lt;a href="https://github.com/plotly/dash">https://github.com/plotly/dash&lt;/a>&lt;/li>
&lt;li>Dash frontend: &lt;a href="https://github.com/plotly/dash-renderer">https://github.com/plotly/dash-renderer&lt;/a>&lt;/li>
&lt;li>Dash core component library: &lt;a href="https://github.com/plotly/dash-core-components">https://github.com/plotly/dash-core-components&lt;/a>&lt;/li>
&lt;li>Dash HTML component library: &lt;a href="https://github.com/plotly/dash-html-components">https://github.com/plotly/dash-html-components&lt;/a>&lt;/li>
&lt;li>Dash component archetype (React-to-Dash toolchain): &lt;a href="https://github.com/plotly/dash-components-archetype">https://github.com/plotly/dash-components-archetype&lt;/a>&lt;/li>
&lt;li>Dash docs and user guide: &lt;a href="https://github.com/plotly/dash-docs">https://github.com/plotly/dash-docs&lt;/a>, hosted at &lt;a href="https://plot.ly/dash">https://plot.ly/dash&lt;/a>&lt;/li>
&lt;li>Plotly.js — the graphing library used by Dash: &lt;a href="https://github.com/plotly/plotly.js">https://github.com/plotly/plotly.js&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="getting-started">Getting started&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://dash.plotly.com/">Dash User Guide&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="deployment">Deployment&lt;/h2>
&lt;p>If you want to share public Dash apps for free, you can deploy it on &lt;a href="www.heroku.com">Heroku&lt;/a>, one of the easiest platforms for deploying and managing public Flask applications.&lt;/p>
&lt;p>Check out the tutorial: &lt;a href="https://dash.plotly.com/deployment">Deploying Dash Apps&lt;/a>&lt;/p>
&lt;h3 id="heroku">Heroku&lt;/h3>
&lt;p>&lt;strong>Heroku&lt;/strong> is a cloud &lt;a href="https://en.wikipedia.org/wiki/Platform_as_a_service">platform as a service&lt;/a> (PaaS) supporting several &lt;a href="https://en.wikipedia.org/wiki/Programming_language">programming languages&lt;/a>. It supports supports &lt;a href="https://en.wikipedia.org/wiki/Java_(programming_language)">Java&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/Node.js">Node.js&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/Scala_(programming_language)">Scala&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/Clojure">Clojure&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/Python_(programming_language)">Python&lt;/a>, &lt;a href="https://en.wikipedia.org/wiki/PHP">PHP&lt;/a>, and &lt;a href="https://en.wikipedia.org/wiki/Go_(programming_language)">Go&lt;/a>. For this reason, Heroku is said to be a &lt;a href="https://en.wikipedia.org/wiki/Polyglot_(computing)">polyglot platform&lt;/a> as it has features for a &lt;a href="https://en.wikipedia.org/wiki/Software_developer">developer&lt;/a> to build, run and scale applications in a similar manner across most languages.&lt;/p>
&lt;h2 id="reference">Reference&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://medium.com/plotly/introducing-dash-5ecf7191b503">🌟 Introducing Dash 🌟&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Matplotlib Issues</title><link>https://haobin-tan.netlify.app/docs/coding/python/visualization/plt_issues/</link><pubDate>Sun, 23 Jan 2022 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/docs/coding/python/visualization/plt_issues/</guid><description>&lt;p>Just to mark down some issues I have met when using &lt;code>matplotlib.pyplot&lt;/code> for plotting.&lt;/p>
&lt;h2 id="change-global-font-to-times-new-roman">Change global font to Times New Roman&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="kn">import&lt;/span> &lt;span class="nn">matplotlib.pyplot&lt;/span> &lt;span class="k">as&lt;/span> &lt;span class="nn">plt&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">plt&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">rcParams&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s1">&amp;#39;font.family&amp;#39;&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s1">&amp;#39;DeJavu Serif&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">plt&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">rcParams&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s1">&amp;#39;font.serif&amp;#39;&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">[&lt;/span>&lt;span class="s1">&amp;#39;Times New Roman&amp;#39;&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Source: &lt;a href="https://stackoverflow.com/a/66462451/4891826">Matplotlib cannot find basic fonts&lt;/a>&lt;/p></description></item><item><title>Visualization Cheatsheet</title><link>https://haobin-tan.netlify.app/docs/coding/python/visualization/cheatsheet/</link><pubDate>Mon, 31 Aug 2020 00:00:00 +0000</pubDate><guid>https://haobin-tan.netlify.app/docs/coding/python/visualization/cheatsheet/</guid><description>&lt;h2 id="matplotlib">Matplotlib&lt;/h2>
&lt;p>&lt;a href="https://github.com/rougier/matplotlib-cheatsheet">matplotlib-cheatsheet&lt;/a>&lt;/p></description></item></channel></rss>