获得 Business Analyst 许可后可用。
描述
Thematically maps a feature class based on a numeric field and displays it as a symbolized chart
使用方法
Charts can be effective for comparing several values at once. For example, you could display ZIP Codes as a pie chart, with each wedge representing population by race.
Compares only a few areas (20 or 30 at most).
Use five or less categories on your chart.
Make sure the values between points vary enough to show differences.
语法
arcpy.ba.SymbolizeByChart(InputFeatureLayer, ChartType, SelectedFields, {UseSelectedFeatures}, {ColorScheme})
参数 | 说明 | 数据类型 |
InputFeatureLayer | The input feature layer. | Feature Layer |
ChartType | The type of chart to be displayed in the thematic map.
| String |
SelectedFields [SelectedField,...] | The attributes to be symbolized in the chart. | Field |
UseSelectedFeatures (可选) | Defines the features that will be used to generate the thematic map.
| Boolean |
ColorScheme (可选) | Selects a predefined color scheme for the thematic map. | String |
代码示例
SymbolizeByChart example (stand-alone script)
# Name: SymbolizeByChart.py
# Description: Symbolizes block groups by total population and total households.
# Author: Esri
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.8\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Defines the parameters for the Symbolize by Chart tool
InputFeatureLayer = "C:/ArcGIS/Business Analyst/US_2022/Data/Demographic Data/BlockGroups_bg.bds"
ChartType = "Bar Chart"
SelectedFields = "TOTPOP_CY;HHPOP_CY"
# Thematically symbolizes a layer by chart
arcpy.SymbolizeByChart_ba (InputFeatureLayer, ChartType, SelectedFields)
# Release extension license
arcpy.CheckInExtension("Business")
环境
此工具不使用任何地理处理环境。
许可信息
- Basic: 需要 Business Analyst
- Standard: 需要 Business Analyst
- Advanced: 需要 Business Analyst