ondrolexa / apsg

Structural geology package for Python
https://apsg.readthedocs.io
Other
102 stars 27 forks source link

Question about the poles color #35

Closed ManuGraiph closed 8 months ago

ManuGraiph commented 1 year ago

Hi!

I'm trying to plot a large number of poles from a list where each one has a different color, all of them in another list, however, i'm getting an error that the list of colors "is not a valid value for color". The code i'm trying is:

color_list = [list_of_colors] g = [list_of_poles]

s.pole(g,color=color_list,ms=7)

And i get the error color_list is not a valid value for color

I can do, alternatively:

s.pole(g[i],color=color_list[i],ms=7) for i in range(len(g))

And works perfect, but it takes waaay longer. I'm guessing i'm missing something in the color input format to make it take a list. Any advice?

ondrolexa commented 1 year ago

Did you try scatter method of StereoNet?

color_list = [list_of_colors]
g = [list_of_poles]  # it must be folset, linset or vecset

s.scatter(g, c=color_list)
ManuGraiph commented 8 months ago

Omg, sorry! It never notified me of this post!

Yes, that indeed solved the problem, thanks a lot!!