Skip to content

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

Closed
@Ionizing

Description

@Ionizing

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions