[英]How do I change my symbology in arcpy to have a clear outline point?
I am not sure why my arcpy result's point outline is not changing to clear in ArcGIS Pro.我不确定为什么我的 arcpy 结果的点轮廓在 ArcGIS Pro 中没有更改为清除。 Everything else works, except for the outline syntax.除了大纲语法外,其他一切都有效。 Is there anything wrong with my syntax or this may be a ArcPro bug?我的语法有什么问题吗,或者这可能是 ArcPro 错误?
`#Add spatial join layer to the current map
p = arcpy.mp.ArcGISProject('CURRENT')
m = p.listMaps('CompTool')[0]
layer = Stream_Comp.getOutput(0)
m.addDataFromPath(layer)
#Format symbology rendering
l = m.listLayers(StreamComp_Name)[0]
sym = l.symbology
if sym.renderer.type == 'SimpleRenderer':
sym.updateRenderer('GraduatedColorsRenderer')
sym.renderer.classificationField = Comp_Field
sym.renderer.classificationMethod = 'NaturalBreaks'
sym.renderer.breakCount = 7
#Updating Symbology Rendering - error:nothing happens to the symbol outline
for brk in sym.renderer.classBreaks:
brk.symbol.size = 6
brk.symbol.outlineColor = {'RGB' : [0, 0, 0, 0]}`
I'm not sure if you put it there by mistake, but you have a " ' " at the end of your brk.symbol.outlineColor line.我不确定你是否把它放错了,但你的 brk.symbol.outlineColor 行的末尾有一个“'”。 Not sure if it's in your code or not, but if that single quote is there, you're probably getting a mismatched quotes syntax error.不确定它是否在您的代码中,但如果该单引号存在,您可能会收到不匹配的引号语法错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.