Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker.color_array doesn't support Vec<f64> anymore? #141

Open
Ionizing opened this issue Mar 10, 2023 · 0 comments
Open

Marker.color_array doesn't support Vec<f64> anymore? #141

Ionizing opened this issue Mar 10, 2023 · 0 comments

Comments

@Ionizing
Copy link

Hi,

I just updated the dependencies of my tiny tool rsgrad, and found there are some breaking change related to color in plotly-rs. The ColorWrapper was removed, and the method impl Color for f64 was also removed. This means I have to transform Vec<f64> to Vec<impl Color> manually, which is rather fussy (I have to write a function to transform f64 to Box<dyn Color> according to each given ColorScalePallete). However, there are still marker.cmin(), marker.cmid() and marker.cmax() methods in API document, the question is do them change anything?

In the latest version of plotly-rs(0.8.3), I have no idea on how to assign the colors for each point in a trace like before (for example, the last fig of ncl bandstructure just used this feature). The examples in plotly-rs book are obsolete, while the large_data_sets in examples/basic_charts/src/main.rs just removes the support of color_array. All these changes just prevented me from adapting the new API of plotly, especially the 'new features' related to color.

So my question is could you please add an example on how to feed marker.color_array() with Vec<f64> or something like that to the documents?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant