Code time as color in Plots.jl ... How?

Hi,

I am plotting a trajectory in the complex plane. If I plot the whole path Plots.jl offers me this:

lala

I would like to know which way it went from beginning to end. I know that Plots.jl offers us a 3-D plot if you pass in the time, but I do not want that.

I would like to code the time dimension as color. Is that possible?

Thank you

1 Like

Have a look at marker_z.

http://docs.juliaplots.org/latest/generated/attributes_series/

2 Likes

Since your result is a timeseries, you can also do simply e.g. color=colormap("Blues")

2 Likes

This is how it looks like. A suitable solution to me.
lala

Thanks

Looks like your colormap wraps a few times because it is too short. You can initialize it with colormap("Blues", N) where N is the length of your data to get a single gradient.

2 Likes

You also probably want to add ratio=1

2 Likes

Such a good point. Thanks again, much better now
lala

With ratio=1 looks even better. Thank you. Such a great community we have here !

lala

1 Like