【ChatGPT 教學補充】繪製折線圖,地理圖

在這篇文章中”【ChatGPT 實戰22】創建圖形, 製作表格, 設計問卷問題, 矩陣” 提及到 ChatGPT-3.5 不能直接展示圖形或圖案,所以退而求其次,請求 ChatGPT 寫出繪製圖形時的步驟。今回小編再嘗試依 ChatGPT 提供的指示,看看是否能使用不同的軟件工具繪製圖形出來。

【例】繪製折線圖 (Line Chart)

Q.May you demonstrate how to plot a line graph using microsoft office?

ChatGPT: Sure, here’s a step-by-step guide on how to create a line graph using Microsoft Office:

  1. Open a new Excel spreadsheet and input your data in columns. Label your columns as needed, for example, “Year” in column A and “Sales” in column B.
  2. Select the cells containing your data, including the column headings.
  3. Click on the “Insert” tab at the top of the screen.
  4. Click on the “Line” chart icon in the Charts group.
  5. Choose the type of line chart you want by selecting the sub-type from the drop-down menu. You can select from several types of line charts, such as 2-D Line, 3-D Line, Stacked Line, and others.
  6. The chart will appear on the same sheet as your data, but you can move it to a separate sheet if you prefer. To move it, select the chart, right-click, and choose “Move Chart” from the drop-down menu.
  7. Customize your chart by adding a title, labels, and other design elements. You can do this by selecting the chart and using the chart tools that appear at the top of the screen.
  8. Save your chart and data in the Excel file.

That’s it! You’ve successfully created a line chart in Microsoft Office.

小編不想自己作數字,叫 ChatGPT 給出 sample dataset。

ChatGPT: Sure, here’s an example dataset you can use to create a line graph:


Using this data, you can create a line graph to visualize the trend in sales over the years.


Line Chart

【例】繪製地理圖(geographical map)

接下來,再嘗試繪製地理圖。同樣地,請求 ChatGPT 提供的建議工具並寫出步驟來。ChatGPT 提供了幾個可以製作地理圖的工具,小編最後選用 Mapbox (注:需先註冊才可使用)。

Q. Can you give an example to visualize a map using Mapbox? (你能舉例說明如何使用 Mapbox 去繪製可視化地圖嗎?)


Sure, here’s an example of how to visualize a map using Mapbox:

1.Sign up for a free Mapbox account at https://www.mapbox.com/signup/.

2.Once you have created an account, go to the Mapbox Studio page at https://studio.mapbox.com/.

3.Click on the “New Style” button to create a new map style.

4.Choose a template for your map style or start from scratch.

5.Use the toolbar on the left-hand side of the screen to add layers to your map, change the background color, and adjust other settings.

6.To add data to your map, click on the “Data” tab and upload a data file in CSV or GeoJSON format.

7.Use the “Layers” tab to add a new layer based on your data. For example, you could add a circle layer to represent points on the map, or a fill layer to represent areas.

8.Customize the appearance of your layer by adjusting the color, size, and opacity of the markers or shapes.

9.Use the “Settings” tab to adjust the zoom level, center point, and other settings for your map.

10.Preview your map by clicking on the “Preview” button in the top right corner of the screen. You can also share your map by clicking on the “Share” button and copying the URL.

Here’s an example of what your map might look like once you have added data and customized the appearance:

This is just a simple example, but Mapbox provides many powerful tools for creating custom maps and visualizations. With a bit of experimentation and creativity, you can create maps that showcase your data and tell compelling stories.

因為在第6點的步驟時要用上一些數據並以csv 格式上傳,所以小編又叫 ChatGPT 去提供 sample datasets,最後經 Mapbox 製作出來的地理圖模樣:

上傳 csv 檔後,可自訂標記的顏色和圖示

後語:連同上回文章,小編前後請求 ChatGPT 寫了 3 次繪圖的指引,3 次都能順利地繪圖,整個繪圖步驟都寫得清晰易懂。若不諳有什麼繪圖工具可以用時,ChatGPT 可以提供最初的建議和入門步驟。

閱讀更多實戰教學>>>【文章索引1-40】ChatGPT 實例教學全示範