Click here to use the template
Welcome to the AI and Statistics series!
Let's dive into how AI can transform tabular data into various types of charts.
Today, we will be using a genetic data table to generate a Volcano Plot .

Don't worry about using the AI Agent-driven Bayeslab, all you need is natural language to get the data analysis result.
All content will be explained in the most comprehensible natural language descriptions to help you get started with data analysis from scratch.
We’ll start with a data table featuring genetic data, which includes fields such as Log2FoldChange, Up, Down, and No-diff.

A Volcano Plot is used to represent the statistical significance relative to the magnitude of change, making it easy to identify significant data points.
We’ll delve into how these prompts influence the final charts and uncover techniques for effective data visualization.
In just 2 minutes, you'll learn to create and refine a Volcano Plot for insightful data representation. Let's start it right now.
Using different prompt inputs, we'll demonstrate how AI generates a Volcano Plot chart.
Our steps will include:
Step 1 - Data Processing
Step 2 - Initial Plot Creation
Step 3 - Chart Refinement
Step 1:Data Processing
Data Processing involves reading the genetic data, merging the "Up," "Down," and "No-diff" columns into a single "P-value" column, and saving the formatted data for further use.
The Prompt is:
Read Genetic data(Volcano map).csv merge the "Up", "Down", and "No-diff" columns into a single column called "P-value", then delete the original three columns. Save this data as a new table named "Volcano Map Data" locally.
Once the above prompt is written, click 'Run' to generate a cleaned data table ready for plotting.
The resulting file is as follows:

Step 2: Initial Plot Creation
Initial Plot Creation entails structuring the data with "Log2FoldChange" on the X-axis and the categorized "P-value" on the Y-axis, followed by the creation of the volcano plot.
The Prompt is:
Read Genetic data(Volcano map).csv which is structured as an XY table. Use "Log2FoldChange" as the X-axis and "P-value" as the Y-axis. Split "P-value" into three categories according to the following rules to create a volcano plot: "Up", "Down", "No-diff".
Step 1: Data Segmentation:
"Up" = "Log2FoldChange" > 1 and "P-value" < 0.05"Down" = "Log2FoldChange" < -1 and "P-value" < 0.05"No-diff" = all other data
Step 2: Data Transformation and Volcano Plotting:
Transform the Y-values for "Up", "Down", and "No-diff" using the formula: Y = -1 * log(Y).Generate a volcano plot with the X-axis as "Log2FoldChange", ranging from -10 to 10.Set the Y-axis to the transformed Y-values, symmetrically distributing around the X-axis at 0.Ensure the data types and ranges are correct at each step to avoid plotting errors.
After preprocessing, verify the transformed data and ranges to create the volcano plot.
Once the above prompt is written, click 'Run' to generate the initial volcano plot showcasing the distribution of data.

Step 3: Chart Refinement
Chart Refinement involves enhancing the plot by adding reference lines, adjusting axis ticks, setting background and border properties, and coloring data points according to their categories.
The prompts for Step 2 and Step 3 are approximately the same, but the Step 3 prompt includes chart embellishments.
The Prompt is:
…… Step 3: Volcano Plot Enhancement:
Add a Y-axis reference line at P=0.05 as a dashed line in light-gray-black, line width 1/2 pt.
Add X-axis reference lines at X=1 and X=-1 as dashed lines in light-gray-black, line width 1/2 pt.
Display minor ticks on both X and Y axes:
X-axis ticks point upwards.
Y-axis ticks point to the right.
Use minor ticks for axis spacing; display only some values for aesthetics.
Add a border around the volcano plot, line width 1/2 pt, in black.
Add a light grey background to the chart area.
Adjust the overall chart proportions to make the Y-axis longer and the X-axis narrower.
Color "Up" points red, "Down" points blue, and "No-diff" points green
Add labels for reference lines on the X and Y axes.
Decrease the spacing of grid lines but do not alter the outer border.
Once the above prompt is written, click 'Run' to view the refined volcano plot with clearly marked significant areas.

Thank you for reading this installment of the AI and Statistics series!
We showed how to process genetic data to create and refine a Volcano Plot, an essential tool for visualizing significant data changes.
Stay tuned for our upcoming demonstrations to explore more fascinating data visualization.
Using AI Agent and Bayeslab, anyone can organize, analyze, plot data charts, and make business data predictions like a professional data analyst based on previous data.