'How to map a string to a RGB value?

The data file is like the following:

# ID,Value, Region
A,30,North
B,26,North
C,49,South
D,55,East
...

Here I would like to map the string (e.g., Region) to a rgb value which will be used as the lc color for boxxy. It can be described as the pseudo-code:

if (region eq "North") {
   "0x1b9e77"
} else if (region eq "South") {
   "0xd95f02"
} else if (region eq "East") {
   "0x7570b3"
} else  {
   "0xe7298a"
}

How can I achieve such mapping in gnuplot? Here, in fact, it is to map $3 to a hex string in using option.



Solution 1:[1]

It looks like your Windows just updated to a new verion or build, that's why moved your project to a folder called windows.old, you need to copy the files that you need outside, then reinstall pycharm. It's recommended to reinstall programs.

For new projects, remember to use git repositories, www.github.com or www.gitlab.com can host private projects to avoid those problems

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pablo Díaz