# Pictogram

This pictogram, submitted by  Dr. Wu Changyu from ScientificPlots (数据绘图), is the winner of our recent “User Submission of the Month” contest. In this blog post,  we will re-create the pictogram using data from New Urban Areas Planned in each Province during China’s Urbanization.   Download the Origin project file here to follow along.

Under the “Project Explorer” tab on the left side, find Book 1, which contains data of New Urban Areas Planned in each Province during China’s Urbanization.

##### Build XY XY table from Book 1 data

To plot a pictogram-like graph, first we need to build the XY values of dots from the single urban number N of every province.

1.  To create Book 2 with the each Province as the X column and the  New Urban Area Plans values as the corresponding Y column, highlight both columns in Book 1, and select Worksheet> Split Columns > Open Dialogue. In the dialogue box, select By Sequential N Rows for Subgroup Method,  change N to 1, and then select the Output  to be a New Book.
2.  The new book will be “locked” at first, because it is still linked to Book 1. Simply click on the lock icon at the top of Column A, and select Recalculate Mode: None. This will unlock the spreadsheet, allowing you to edit further.
3.  Next, we need to fix the Long Name and set each column designation as XY XY. To do this first, copy/paste Row 1 to Long Name. Then, with the entire worksheet selected, right-click inside the worksheet and select Set As > XY XY. This will convert each column to corresponding pairs of X1Y1 , X2Y2, etc for plotting.
4.  Since the graph arranges every 10 dots in a row, we can use right-click menu Fill Column with: A set of Numbers to fill X column with row number 1 – 10 repeated by int(N/10) times, and Y column with row number n (n from 1 to int(N/10)) for every 10 X values, like steps shown in below screenshot. If N not divisible by 10, manually delete superfluous values at the end.

Do this for all columns, and then we have Book2 ready for plotting.

##### Create a pictogram from GuangDong province.
1. Highlight first 2 columns of GuangDong. Select Plot> Basic 2D > Scatter to create a scatter graph.
2. Double click on Y axis. In the Axis dialog, go to Scale tab. Check Reverse checkbox. Select Fixed for Rescale.
3. Double click on the graph to open the Plot Details dialog.
• Select Layer 1 branch on the left panel and go to Size tab on the right. Check Link Axis Length to Scale with X:Y Ratio checkbox.
• Go to Display/Speed tab. Uncheck X Axes and Y Axes checkboxes in Show Elements group.
• Select plot branch on the left panel and go to Symbol tab on the right. Change symbol Size and Color.
4. Select from menu Graph: Fix Page to Layer.
5. Add Text object and use syntax
%(1X,@LL) %(1Y,@LL)
to refer to province name and urban area number in column LongName. Don’t forget to set “Link to (%,\$), Substitution Level” to 1 on Programming tab of Text Object dialog.

##### Create pictograms for other provinces and merge them into one graph
1. Right click on the graph window title and select Duplicate (Batch Plotting)
2. Select Column for Batch Plot with. Select all columns listed and click OK to plot pictograms for all the rest provinces.
3. Select from menu Graph: Merge Graph Windows to merge all graphs.