Data Visualization Example: How to Convert 2D Data Table to Dual Y-Axis Chart with AI?

Data Visualization Example: How to Convert 2D Data Table to Dual Y-Axis Chart with AI?

Data Visualization Example: How to Convert 2D Data Table to Dual Y-Axis Chart with AI?

Data Visualization Example: How to Convert 2D Data Table to Dual Y-Axis Chart with AI?

Jan 10, 2025

Jan 10, 2025

5 min read

5 min read

Click here to use the template

Dual Y-Axis Chart

Welcome to the AI and Statistics series! Today, we’ll explore how AI can turn tabular data into various types of charts. 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 reveal how AI generates two distinct dual-axis chart results:

● A beginner-level dual-axis chart

● 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 1 minute, you'll learn to craft a professional-grade dual-axis chart.

The data source for this template uses the 2D Data Table structure (one of the 6 Common Table Structures). For a detailed description of the table types, please see the supplementary information at the bottom of this page.

1.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.

2. 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:

Border style: Frameless with single-line grid lines on both X and Y axes.

Total number axis: Ticks point right, with values in scientific notation.

Percentage axis: Ticks point left, with a "%" suffix.

Background: Add a very light gray color.

Use different shapes for data points on different lines.

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!

Supplement

In this template, the data source table structure we use belongs to the 2D Data Table (one of 6 Common Table Structures)

Type 1: Single Y-Value Input

Type 2: Multiple Replicate Y-Values Input in Side by Side Subcolumns

Common Table Structures

(1) 2D Data Table: Each row represents a single data point coordinate.

(2) Column Table: Each column represents a group; row data does not indicate grouping.

(3) Contingency Table: Most data structures are 2 rows by 2 columns.

(4) Grouped Table: Each column represents one group, and each row represents another group.

(5) Nested Table: Each column contains at least two subcolumns.

(6) Multivariate Table: Each column represents a single variable, and each row represents a single data point or sample.

You can select a data analysis template based on the type of table structure in your actual business data, which can help help AI to achieve better and more efficient analysis results.

Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy
as note-taking!

Start Free

Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy as note-taking!