File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 - new flag ` -b, --buffer-size ` .
2222 - ` csvtk plot line ` :
2323 - only add legend for more than one group. [ #279 ] ( https://github.com/shenwei356/csvtk/issues/279 )
24+ - sort points by X for plotting lines. [ #280 ] ( https://github.com/shenwei356/csvtk/issues/280 )
2425- [ csvtk v0.30.0] ( https://github.com/shenwei356/csvtk/releases/tag/v0.30.0 )
2526[ ![ Github Releases (by Release)] ( https://img.shields.io/github/downloads/shenwei356/csvtk/v0.30.0/total.svg )] ( https://github.com/shenwei356/csvtk/releases/tag/v0.30.0 )
2627 - ` csvtk ` :
Original file line number Diff line number Diff line change @@ -194,6 +194,14 @@ Notes:
194194 addLegend := len (groupOrders ) > 1
195195 for _ , gor := range groupOrders {
196196 v := groups [gor .Key ]
197+
198+ // sort by x
199+ if ! scatter {
200+ sort .Slice (v , func (i , j int ) bool {
201+ return v [i ].X < v [j ].X
202+ })
203+ }
204+
197205 g := gor .Key
198206 if ! scatter {
199207 lines , points , err := plotter .NewLinePoints (v )
You can’t perform that action at this time.
0 commit comments