I would recommend a thorough read of the performance tips to make sure your code is efficient on a single process before you try to make it parallel. Your code has a few issues (global untyped dictionaries are an immediate red flag) that, when fixed, might be able to deliver more than the ~8x speedup you’d get from parallelism.
Separately, the error you’re seeing is from the GR plotting library, which is an external C library and may not cooperate well with Julia’s multithreading. You might be better off with pmap.