I'm trying to edit a stretched raster legend item to only show values instead of the "High : " and "Low : " that are standard. I've created a layer template that doesn't include the high/low in the labels, and if I add that layer to a dataframe in ArcMap it works fine:
But when I execute the following code and export the PDF, the high/low shows up in the labels:
dfRef = arcpy.mapping.ListDataFrames(mxd, "dfTile" + str(iRef)) dfRef.spatialReference = srUTM lgdRef = arcpy.mapping.ListLayoutElements(mxd, "LEGEND_ELEMENT", "dfTile" + str(iRef) + "_legend") result4 = arcpy.MakeRasterLayer_management(pathScratchGDB + "tempElev_Final", "tempRaster4") layer4 = result4.getOutput(0) arcpy.ApplySymbologyFromLayer_management(layer4, pathTemplateLayers + "/elevation_template.lyr") arcpy.mapping.AddLayer(dfRef, layer4, "TOP") arcpy.RefreshActiveView() arcpy.RefreshTOC() arcpy.mapping.ExportToPDF(mxd, r'C:\Imagery\temp.pdf')
I've tried creating a custom legend item style and updating it using the updateItem method found here but that didn't work either.
Does anyone know how to control stretched raster legend labels via ArcPy?