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 2D data table to generate a Dual Y-Axis Chart.
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:
● Dimension 1 corresponds to the X variable, which we use to plot the X-axis representing “Years”
● Dimension 2 corresponds to the Y variables, showing two different aspects:
● Y-axis 1 for the total number of SCI papers, field name “Total number”
● Y-axis 2 for the percentage of English papers by Chinese scholars in SCI, field name “Percentage”

Dual-axis charts effectively display these two variables simultaneously, using both the left and right Y-axes to convey different trends, which helps in understanding the relationships between these variables.
Using different prompt inputs, we’ll demonstrate how AI generates two dual-axis chart results, our steps will include:
Step 1 — Plot a beginner-level dual-axis chart
Step 2 — Plot an advanced, professional, and visually appealing dual-axis chart
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 craft a professional-grade dual-axis chart.
Step 1 — Plot a beginner-level dual-axis chart
Prompt:
Read SCI Paper Data.csv , which is a dataset structured as an XY table. Generate a dual Y-axis scatter line chart with the title “SCI Paper Data”.
X-axis: Display the “Years” field.
Y-axis 1: Display the “Total number” field.
Y-axis 2: Display the “Percentage” field.

Step 2 — Plot an advanced dual-axis chart
Prompt:
Read SCI Paper Data.csv which is a dataset structured as an XY table. Generate a dual Y-axis scatter line chart with the title “SCI Paper Data”.
X-axis: Display the “Years” field.
Left Y-axis: Display the “Total number” field.
Right Y-axis: Display the “Percentage” field, noting this field represents values as percentages (e.g., 17.22 represents 17.22%).
Ensure the final chart is fully adaptive to fill the display area. Chart enhancements:
1. Border style: Frameless with single-line grid lines on both X and Y axes.
2. Total number axis: Ticks point right, with values in scientific notation.
3. Percentage axis: Ticks point left, with a “%” suffix.
4. Background: Add a very light gray color.
5. Use different shapes for data points on different lines.
6. Extend X-axis and both Y-axes limits slightly beyond the actual data range.

Thank you for reading this installment of the AI and Statistics series! We showed how various steps can create high-quality classification charts.
Stay tuned for our upcoming demonstrations to explore more fascinating topics in data visualization.
Remember, the right steps can transform your data into compelling stories.
See you next time as we continue to explore the power of data!