I am using the arcpy code from How To: Sort unique value symbology classes using values from a second field in ArcGIS Pro (esri.com). Instead of using the colorRamp, how do I use a color scheme such as "Random Basic" that is available in the symbology pane in ArcGIS Pro? I am symbolizing lines and sorting routes by their importance using another field other than the one I want to use for the symbol label.
Please point me to the reference page(s). Thank you.
That worked. Thanks!
That method, p.listColorRamps() gets all colors that are in the project if you remove the wildcard. From there, you can see the names of available color styles:
colors = p.listColorRamps() for color in colors: print(f'color name: {color.name}') ... color name: Accent (8 Classes) color name: Aspect color name: Basic Random color name: Bathymetric Scale color name: Bathymetry #1 color name: Bathymetry #2 color name: Bathymetry #3 color name: Bathymetry #4 ...
Your basic random is listed there... but since you are you should be able to just use 'Basic Random'
colorRamp = p.listColorRamps("Basic Random")[0]
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.