<?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: Sujit Mali</title>
    <description>The latest articles on DEV Community by Sujit Mali (@sujit_mali).</description>
    <link>https://dev.to/sujit_mali</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%2F782545%2Ff9cf98ce-63a3-4deb-81c5-af61a2f000dd.jpeg</url>
      <title>DEV Community: Sujit Mali</title>
      <link>https://dev.to/sujit_mali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sujit_mali"/>
    <language>en</language>
    <item>
      <title>Scatter Plots: The "By Hand" Method vs. The 30-Second Shortcut</title>
      <dc:creator>Sujit Mali</dc:creator>
      <pubDate>Mon, 08 Dec 2025 06:14:29 +0000</pubDate>
      <link>https://dev.to/sujit_mali/python-scatter-plots-the-by-hand-method-vs-the-30-second-shortcut-21bk</link>
      <guid>https://dev.to/sujit_mali/python-scatter-plots-the-by-hand-method-vs-the-30-second-shortcut-21bk</guid>
      <description>&lt;p&gt;If you work with data in Python, matplotlib is basically muscle memory at this point. It is the grandfather of Python visualization libraries - powerful, flexible, and capable of doing almost anything if you have enough patience.&lt;/p&gt;

&lt;p&gt;But let’s be honest: sometimes you don't want to write 20 lines of code just to see if two columns of data are correlated.&lt;/p&gt;

&lt;p&gt;I wanted to share a quick refresher on the "standard" way to build a production-ready scatter plot in Matplotlib, and then share a quick browser-based utility I found for when you just need the chart now without firing up a Jupyter Notebook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1: The Matplotlib Way
&lt;/h2&gt;

&lt;p&gt;If you are building a pipeline or need something highly reproducible, you have to code it. Here is the boilerplate I use to get a scatter plot that doesn't look like it was made in 1995.&lt;/p&gt;

&lt;p&gt;We need to handle the data, the labels, the alpha (transparency), and the grid manually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import matplotlib.pyplot as plt
import numpy as np

# 1. Generate some dummy data
# Let's pretend this is "Page Load Time" vs "User Bounce Rate"
np.random.seed(42)
x = np.random.rand(50) * 10
y = 2 * x + 1 + np.random.randn(50) * 2  # Positive correlation with noise

# 2. Create the figure
plt.figure(figsize=(10, 6))

# 3. The Scatter Plot command
# We add 'alpha' because overlapping points are misleading
# We add 'edgecolors' to make the dots pop
plt.scatter(x, y, color='dodgerblue', alpha=0.7, edgecolors='k', s=100)

# 4. The Styling (The part we always forget)
plt.title('Page Load Time vs. Bounce Rate', fontsize=16)
plt.xlabel('Load Time (seconds)', fontsize=12)
plt.ylabel('Bounce Rate (%)', fontsize=12)
plt.grid(True, linestyle='--', alpha=0.5)

# 5. Show it
plt.show()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works perfectly. But, to get that image, I had to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spin up my environment.&lt;/li&gt;
&lt;li&gt;Remember the syntax for figsize (is it width, height or height, width?).&lt;/li&gt;
&lt;li&gt;Google how to set the transparency of the grid lines again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Part 2: The "I Just Need a PNG" Way
&lt;/h2&gt;

&lt;p&gt;Sometimes, I’m just chatting with a PM or a client, and I have a CSV file. I don't want to open VS Code. I just want to visualize the relationship instantly.&lt;/p&gt;

&lt;p&gt;For those moments, I stopped coding it.&lt;/p&gt;

&lt;p&gt;I started using this &lt;a href="https://scatterplotmaker.com/" rel="noopener noreferrer"&gt;Scatter Plot Maker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s effectively a wrapper for the visualization process but without the coding overhead.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You paste your data.&lt;/li&gt;
&lt;li&gt;It handles the axis scaling automatically.&lt;/li&gt;
&lt;li&gt;You get the downloadable image.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I timed it: The Python script took me about 4 minutes to write and debug (mostly formatting the axis labels). The online tool took about 45 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Verdict?
&lt;/h2&gt;

&lt;p&gt;If you are building a dashboard for a client? &lt;strong&gt;Stick to Python&lt;/strong&gt;. If you just need to visualize a dataset for a presentation, a Slack message, or a quick sanity check? &lt;strong&gt;Save your brain cells and use the generator.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do you guys have any other "no-code" tools you use to skip the boilerplate? Let me know in the comments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>matplotlib</category>
      <category>dataviz</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to import and export functions in JavaScript ?</title>
      <dc:creator>Sujit Mali</dc:creator>
      <pubDate>Wed, 15 Feb 2023 06:34:00 +0000</pubDate>
      <link>https://dev.to/sujit_mali/how-to-import-and-export-functions-in-javascript--1kkf</link>
      <guid>https://dev.to/sujit_mali/how-to-import-and-export-functions-in-javascript--1kkf</guid>
      <description>&lt;p&gt;In this blog, we will discuss how to import and export functions in JavaScript. &lt;/p&gt;

&lt;p&gt;In JavaScript, there are different ways to import and export functions. Here are 2 common ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Default Export&lt;/li&gt;
&lt;li&gt;Named Exports&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Default Export
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// greet.js 
export default function greet(name) {  // EXPORT
  console.log(`Hello, ${name}!`);
}

// app.js
import greet from './greet.js';  // IMPORT
greet('Sam');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we're exporting a function using the export default syntax. This allows us to import the function using any name we want in the importing file, and it doesn't require us to use curly braces when importing. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The export default syntax allows you to export only a single value from a module as the default export.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Named Exports
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// math.js
export function add(a, b) {            // EXPORT
  return a + b;
}

export function subtract(a, b) {      // EXPORT
  return a - b;
}

// app.js
import { add, subtract } from './math.js'; // IMPORTS
console.log(add(3, 4));
console.log(subtract(5, 2));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we're exporting two functions (add and subtract) using the named exports syntax. To import these functions, we need to use curly braces and specify the names of the functions we want to import.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; While importing, the Name of the function should be the same as defined.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt; &lt;br&gt;
Export all function in one line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// math.js
function add(a, b) { 
  return a + b;
}

function subtract(a, b) {      
  return a - b;
}

export { add, subtract };      // EXPORT ALL FUNTION IN ONE LINE

// app.js
import { add, subtract } from './math.js'; // IMPORT

console.log(add(2, 3));
console.log(subtract(5, 3));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ai</category>
      <category>learning</category>
      <category>career</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to make a line graph in google sheets?</title>
      <dc:creator>Sujit Mali</dc:creator>
      <pubDate>Fri, 20 Jan 2023 09:59:28 +0000</pubDate>
      <link>https://dev.to/sujit_mali/how-to-make-a-line-graph-in-google-sheets-4ebl</link>
      <guid>https://dev.to/sujit_mali/how-to-make-a-line-graph-in-google-sheets-4ebl</guid>
      <description>&lt;p&gt;To make a line graph in Google Sheets, follow these steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Enter the data
&lt;/h2&gt;

&lt;p&gt;Enter your data in your sheets.&lt;br&gt;
E.g &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lzzkd8bh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4vky94fbyi1g2qyoike.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lzzkd8bh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4vky94fbyi1g2qyoike.png" alt="linegraph" width="364" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Select the data
&lt;/h2&gt;

&lt;p&gt;The second step after the step 1 is to selecting the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u5iGWx2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/393sjum213u76n9bpax7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u5iGWx2i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/393sjum213u76n9bpax7.png" alt="linegraph" width="402" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Click on Insert Chart
&lt;/h2&gt;

&lt;p&gt;Click on "Insert Chart" at top toolbar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Uss9mrZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxdbbml4kb3g1mhs214.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Uss9mrZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/doxdbbml4kb3g1mhs214.png" alt="linegraph" width="880" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Select the line chart.
&lt;/h2&gt;

&lt;p&gt;Select the chart you want to create. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5zA0UWoB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qfnmy0i314sg7d71a9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5zA0UWoB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qfnmy0i314sg7d71a9o.png" alt="linegraph" width="880" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Customize
&lt;/h2&gt;

&lt;p&gt;Final step customize your chart such as Color, Point, Legend, Axis and Text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iz0qSsxd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mx1i2z0gum80i2cv8qfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iz0qSsxd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mx1i2z0gum80i2cv8qfc.png" alt="linegraph" width="880" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Download
&lt;/h2&gt;

&lt;p&gt;First select your graph and click on three dots.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7u75GiLi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsg2vhryc4e9fodfg93m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7u75GiLi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsg2vhryc4e9fodfg93m.png" alt="linegraph" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally download your graph as png, svg or pdf format.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6tEDRXqz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l36k8dalc1x5dpjed2ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6tEDRXqz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l36k8dalc1x5dpjed2ef.png" alt="linegraph" width="880" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR &lt;br&gt;
You can try &lt;a href="https://linegraphmaker.co/"&gt;line graph maker&lt;/a&gt; to create graph easily.&lt;/p&gt;

</description>
      <category>googlesheet</category>
      <category>linegraph</category>
    </item>
    <item>
      <title>How to read a histogram?</title>
      <dc:creator>Sujit Mali</dc:creator>
      <pubDate>Fri, 20 Jan 2023 06:55:24 +0000</pubDate>
      <link>https://dev.to/sujit_mali/how-to-read-a-histogram-490b</link>
      <guid>https://dev.to/sujit_mali/how-to-read-a-histogram-490b</guid>
      <description>&lt;p&gt;A histogram is a graphical representation of the distribution of a dataset. It is an estimate of the probability distribution of a continuous variable. To read a histogram in detail, you should pay attention to the following elements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The x-axis represents the variable of interest, while the y-axis represents the frequency of that variable.&lt;/li&gt;
&lt;li&gt;The bars of the histogram show the frequency of observations within each class or bin. The height of each bar corresponds to the number of observations that fall within the corresponding class.&lt;/li&gt;
&lt;li&gt;The shape of the histogram can reveal information about the distribution of the data. For example, a symmetric histogram with a bell-shaped curve indicates a normal distribution, while a histogram with a long tail to the right or left indicates a skewed distribution.&lt;/li&gt;
&lt;li&gt;The number of classes or bins can also be important. A histogram with too few classes can make the data appear more variable than it really is, while a histogram with too many classes can make the data appear less variable than it really is.&lt;/li&gt;
&lt;li&gt;The histogram can also be used to identify patterns or outliers in the data by looking for gaps or clusters in the distribution.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, it is important to keep in mind that histograms are just one way of visualizing data, and other types of plots such as box plots, scatter plots, etc might be better suited depending on the context and the question you want to answer.&lt;br&gt;
You can create histogram easily using &lt;a href="https://histogrammaker.co/"&gt;histogram maker.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>chart</category>
      <category>graphs</category>
      <category>histogram</category>
    </item>
  </channel>
</rss>
