How to vary symbol shape and color based on a non-numerical attributes

805
3
05-27-2020 05:38 PM
ZoeAmerigian
New Contributor

I have a layer of points that each have two attributes. I want Attribute 1 to control the symbol shape and Attribute 2 to control the symbol color, with any possible combination of the two. Both are inputted as Text datatypes for the moment. Attribute 1 has 3 domain values and Attribute 2 has 6 domain values.

To change the symbol shape based on Attribute 1, I changed the layer symbology to Unique Values and assigned a shape to each domain value of that attribute. But I cannot figure out how to make the symbol color change based on the other attribute. I tried assigning Unique Values based on two fields, but creating a symbol/color combination for all possible combinations of attributes is very cumbersome. I tried changing Attribute 2 to a numerical integer and using "Vary symbology based on color", but this feature appears to be for continuous numerical values and not discrete values.

How do I approach this?

3 Replies
DavidPike
MVP Frequent Contributor

I would keep a field as text and classify it according to Unique Values, figure out how you want to size the other field and then create a new field with the appropriate numbers to size from.

Eggs    |  Chicken  |  1

Eggs    |  Ostrich   |   5

Eggs    |  Duck      |   2

Beans  |  Beanstalk  |  2

Beans  |  Giant Beanstalk  |  10

To symbolise by these follow the workflow described here:

https://community.esri.com/thread/252997-how-to-symbolize-by-type-and-size-in-pro 

0 Kudos
ZoeAmerigian
New Contributor

I did try this (varying by color, not size) but it is a little iffy working with discrete values instead of continuous ones. I made Attribute 2 a short integer datatype and used the Color option of "Vary symbology by attribute".

Then I made a discrete color scheme with 6 colors to match to the 6 domain values of the attribute. But when I do this, the color scheme breaks up the possible values into 3 "ranges" (see screenshot). I'm not sure why there are only 3, if I could create 6 ranges I could maybe map them to the 6 values, but I can't seem to figure out how to change the number of value ranges. Ideally I could simply map one color to one value and not have any ranges at all.

Below you can see the the 3 ranges on the left in the Contents panel the range sliders in the Symbology panel on the right.

0 Kudos
MillerWang
New Contributor II

It certainly could be done with Arcade expression, which is almost the same as any code language. Here is one of my example. Cheers!

MillerWang_0-1638555971279.png

 

0 Kudos