ComfyUI > Nodes > ComfyUI-Data-Analysis > MPL Scatter Plot

ComfyUI Node: MPL Scatter Plot

Class Name

MPLScatter

Category
Data Analysis
Author
HowToSD (Account age: 833days)
Extension
ComfyUI-Data-Analysis
Latest Updated
2025-06-11
Github Stars
0.02K

How to Install ComfyUI-Data-Analysis

Install this extension via the ComfyUI Manager by searching for ComfyUI-Data-Analysis
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Data-Analysis in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

MPL Scatter Plot Description

MPLScatter creates customizable scatter plots with Matplotlib to visualize data relationships.

MPL Scatter Plot:

The MPLScatter node is designed to create scatter plots using the Matplotlib library, a powerful tool for data visualization in Python. This node allows you to visualize the relationship between two variables by plotting data points on a two-dimensional graph. The primary goal of MPLScatter is to provide a clear and intuitive way to represent data, making it easier to identify patterns, trends, and correlations. By leveraging Matplotlib's capabilities, this node offers flexibility in customizing the appearance of the scatter plot, including titles, axis labels, and tick formatting. This makes it an invaluable tool for AI artists and data analysts who need to present data insights in a visually appealing manner.

MPL Scatter Plot Input Parameters:

dataframe

The dataframe parameter is a Pandas DataFrame that contains the data you wish to visualize. It serves as the source of the x and y values for the scatter plot. The DataFrame should be structured with columns representing different variables, and it is crucial for the data to be clean and well-organized to ensure accurate plotting. There are no specific minimum or maximum values for this parameter, but it should be a valid Pandas DataFrame.

x_column_name

The x_column_name parameter specifies the name of the column in the DataFrame that will be used for the x-axis values. This parameter is essential for determining which data points will be plotted along the horizontal axis. It should match one of the column names in the DataFrame, and there are no default values as it depends on the user's dataset.

y_column_name

The y_column_name parameter indicates the name of the column in the DataFrame that will be used for the y-axis values. Similar to x_column_name, this parameter is crucial for defining the vertical positioning of data points on the scatter plot. It must correspond to a column name in the DataFrame, with no default values provided.

title

The title parameter allows you to set a descriptive title for the scatter plot. This helps provide context and understanding of the data being visualized. The title can be any string, and there are no restrictions on its length or content.

x_axis_label

The x_axis_label parameter is used to label the x-axis of the scatter plot. It provides additional information about the data represented on the horizontal axis, enhancing the plot's readability. This parameter accepts any string value.

y_axis_label

The y_axis_label parameter serves to label the y-axis of the scatter plot, offering clarity on what the vertical axis represents. Like the x_axis_label, it accepts any string value.

x_tick_as_int

The x_tick_as_int parameter is a boolean that determines whether the x-axis tick labels should be displayed as integers. This can be useful when the x-axis represents discrete categories or whole numbers. The default value is typically False, meaning tick labels are displayed as they are in the data.

MPL Scatter Plot Output Parameters:

figure

The figure output parameter represents the Matplotlib figure object that contains the scatter plot. This object is crucial as it encapsulates all the elements of the plot, including the axes, labels, and data points. It allows for further customization and manipulation of the plot if needed.

axis

The axis output parameter refers to the Matplotlib axis object associated with the scatter plot. This object provides access to various axis-specific properties and methods, enabling you to adjust the appearance and behavior of the plot's axes.

MPL Scatter Plot Usage Tips:

  • Ensure your DataFrame is clean and well-structured, with clearly named columns, to facilitate accurate plotting.
  • Use descriptive titles and axis labels to provide context and improve the interpretability of your scatter plot.
  • Consider setting x_tick_as_int to True if your x-axis data represents discrete categories or whole numbers for better readability.

MPL Scatter Plot Common Errors and Solutions:

ValueError: Could not interpret input 'x_column_name'

  • Explanation: This error occurs when the specified x_column_name does not match any column in the DataFrame.
  • Solution: Verify that the x_column_name matches exactly with one of the column names in your DataFrame.

ValueError: Could not interpret input 'y_column_name'

  • Explanation: This error arises when the y_column_name provided does not correspond to any column in the DataFrame.
  • Solution: Check that the y_column_name is correctly spelled and matches a column name in your DataFrame.

TypeError: 'dataframe' must be a Pandas DataFrame

  • Explanation: This error indicates that the dataframe parameter is not a valid Pandas DataFrame.
  • Solution: Ensure that the data you pass to the dataframe parameter is a properly constructed Pandas DataFrame.

MPL Scatter Plot Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Data-Analysis
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.