SiegeLord / RustGnuplot

A Rust library for drawing plots, powered by Gnuplot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

set_palette caused error

bgkillas opened this issue · comments

been trying to get domain coloring and noticed that
.set_palette(PaletteType::Custom(&[(1.0, 1.0, 1.0, 1.0)]))
fails with

gnuplot> set palette defined (1.000000000000e0 1.000000000000e0 1.000000000000e0 1.000000000000e0)
                                                                                                 ^
         line 0: invalid palette syntax

Thanks for reporting! You need at least two palette entries. The documentation/internal correctness check was wrong.