How do I change shape and color based on two different attributes? And how do I fix the color bar?

1122
14
Jump to solution
01-18-2024 10:51 AM
GraceKowalski
New Contributor II

Hello! I have ArcGIS Pro version 3.2, I believe. I'm trying to plot temperature data as a color and then sensor type as a shape. Say, for example, I have 8 sensor types. There are two I care about and want to make a triangle, the rest are circles. I think I found a way to do that by using "Unique Value" in the Symbology pane, then just changing the ones I want to which shapes I want. Then I want color to vary by temperature.  I want to the "Vary symbology by attribute" pane to change color according to temperature. But then it makes the color look confusing, where it only labels the highest and lowest values, and the rest are just in the middle. I want to have the color bar range from 17-23 by 0.5 deg C intervals. Is there a way to do this? I tried in Arcade but got an error, so I may not know how to type in it. Also, just in general, is there any easier way to do this whole thing?

Screenshot for confusing color bar legend:

GraceKowalski_0-1705603709900.png

Screenshot of attempted Arcade code and error:

GraceKowalski_1-1705603794149.png

I would then go through and write code for it up until number 23, but I can't get past this first error. Thank you for any help!

0 Kudos
14 Replies
ZachBodenner
MVP Regular Contributor

Ok so the legend getting formatted this way kind of looks like expected behavior, at least when you check the "Show Legend" button in the Vary Symbology by Attribute pane. The next question is: what is the end result of the map you're making? There's a variety of ways to re-frame the issue you're having, but it would be helpful to know what you want the result to look like. 

 

For example, you could just use the arcade you have now to set the available ranges, then change the symbols of the points to triangles:

ZachBodenner_1-1705675640838.png

 

Then if you only wanted some of the sensor types, you could use a definition query to only include the values you need:

ZachBodenner_3-1705675714646.png

 

ZachBodenner_2-1705675696931.png

When it comes to the legend, are you going to need to make a layout and print this? Will there be a lot of changes? You can manually build/edit a legend in the layout if you needed to.

0 Kudos
GraceKowalski
New Contributor II

Thank you so much for spending all the time trying to figure this out! The end result of the map I'm trying to make is for DQ and GB to be triangles, while the rest are all circles. Then I want all points (circles and triangles) to share a color bar based on temperature. I was able to do all of that but, as was the recurring problem, the legend looked bad. I am going to make a layout, not to print, but to put in some presentations, where I want a legend present. Unsure of how many changes will occur. If you think manually editing a legend in layout is the best approach, I would appreciate any insight on how to do so! Thank you again!!

0 Kudos
ZachBodenner
MVP Regular Contributor

Sure, okay so I don't really know exactly what the different sensor types are, but another option would be to copy the layer by right clicking it in the table of contents, and pasting it there so you have two of the same layer. Then you can switch the definition query of your new layer to be the opposite (ie. show only AS and CT) and change those symbols to circles:

ZachBodenner_0-1705685269141.png

Then, to make your legend easier to manage in the layout, you can change the Label value in the symbology pane (mine will look different than yours because you have more values in your CSV but you see the idea):

ZachBodenner_1-1705685348415.png

ZachBodenner_2-1705685361504.png

Then you go ahead and add a legend to your layout and there will be two legend items, one for each layer (and therefore groups of sensors). 

GraceKowalski
New Contributor II

Ah! That sounds great!! Thank you so much! 

0 Kudos
ZachBodenner
MVP Regular Contributor

Great! If you consider that a solution the the question you initially proposed, make sure the click the Accept as Solution button so that others who find this can use it as reference.

0 Kudos