rawgraphs / rawgraphs-charts

A curated selection of charts provided through RAWGraphs interface
https://rawgraphs.io/
Apache License 2.0
95 stars 42 forks source link

incorrect jumps in place of monotone smooth curves #135

Closed maciejskorski closed 1 year ago

maciejskorski commented 1 year ago

In which chart does the bug happen?

RAWGraphs Version

RAWGraphs 2.0 beta](https://app.rawgraphs.io/)

Web browser and version

Google Chrome | 107.0.5304.87 (Official Build) (x86_64)

Operating System

MacOSX

Steps to reproduce this

I am getting this wrong chart (the curves are monotone smooth with no jumps)

image

in place of the correct (generated using matplotlib)

image

using this csv data, with x=percentile, y=q, color=cohort, line=cohort

""" q,percentile,cohort 0.00,0.80,all 0.01,9.80,all 0.02,10.00,all 0.03,10.20,all 0.04,10.30,all 0.05,10.40,all 0.06,10.50,all 0.07,10.60,all 0.08,10.70,all 0.09,10.80,all 0.10,10.90,all 0.11,10.90,all 0.12,11.00,all 0.13,11.10,all 0.14,11.20,all 0.15,11.30,all 0.16,11.40,all 0.17,11.50,all 0.18,11.60,all 0.19,11.60,all 0.20,11.70,all 0.21,11.80,all 0.22,11.90,all 0.23,12.00,all 0.24,12.10,all 0.25,12.20,all 0.26,12.30,all 0.27,12.40,all 0.28,12.50,all 0.29,12.50,all 0.30,12.60,all 0.31,12.70,all 0.32,12.80,all 0.33,12.90,all 0.34,13.00,all 0.35,13.10,all 0.36,13.20,all 0.37,13.30,all 0.38,13.30,all 0.39,13.40,all 0.40,13.50,all 0.41,13.60,all 0.42,13.70,all 0.43,13.80,all 0.44,13.90,all 0.45,13.90,all 0.46,14.00,all 0.47,14.10,all 0.48,14.20,all 0.49,14.30,all 0.50,14.40,all 0.51,14.50,all 0.52,14.60,all 0.53,14.70,all 0.54,14.80,all 0.55,14.90,all 0.56,15.00,all 0.57,15.10,all 0.58,15.20,all 0.59,15.30,all 0.60,15.40,all 0.61,15.60,all 0.62,15.70,all 0.63,15.80,all 0.64,16.00,all 0.65,16.10,all 0.66,16.20,all 0.67,16.40,all 0.68,16.60,all 0.69,16.80,all 0.70,17.00,all 0.71,17.20,all 0.72,17.40,all 0.73,17.70,all 0.74,17.90,all 0.75,18.20,all 0.76,18.50,all 0.77,18.90,all 0.78,19.30,all 0.79,19.70,all 0.80,20.20,all 0.81,20.70,all 0.82,21.30,all 0.83,21.90,all 0.84,22.60,all 0.85,23.40,all 0.86,24.30,all 0.87,25.10,all 0.88,26.10,all 0.89,27.20,all 0.90,28.30,all 0.91,29.60,all 0.92,31.00,all 0.93,32.70,all 0.94,34.60,all 0.95,37.00,all 0.00,0.80,sepsis 0.01,9.90,sepsis 0.02,10.10,sepsis 0.03,10.30,sepsis 0.04,10.40,sepsis 0.05,10.50,sepsis 0.06,10.70,sepsis 0.07,10.80,sepsis 0.08,10.90,sepsis 0.09,11.10,sepsis 0.10,11.20,sepsis 0.11,11.30,sepsis 0.12,11.50,sepsis 0.13,11.60,sepsis 0.14,11.70,sepsis 0.15,11.80,sepsis 0.16,11.90,sepsis 0.17,12.10,sepsis 0.18,12.20,sepsis 0.19,12.30,sepsis 0.20,12.40,sepsis 0.21,12.50,sepsis 0.22,12.60,sepsis 0.23,12.70,sepsis 0.24,12.80,sepsis 0.25,12.90,sepsis 0.26,13.00,sepsis 0.27,13.10,sepsis 0.28,13.20,sepsis 0.29,13.30,sepsis 0.30,13.30,sepsis 0.31,13.40,sepsis 0.32,13.50,sepsis 0.33,13.60,sepsis 0.34,13.70,sepsis 0.35,13.70,sepsis 0.36,13.80,sepsis 0.37,13.90,sepsis 0.38,14.00,sepsis 0.39,14.10,sepsis 0.40,14.10,sepsis 0.41,14.20,sepsis 0.42,14.30,sepsis 0.43,14.40,sepsis 0.44,14.50,sepsis 0.45,14.60,sepsis 0.46,14.60,sepsis 0.47,14.70,sepsis 0.48,14.80,sepsis 0.49,14.90,sepsis 0.50,15.00,sepsis 0.51,15.10,sepsis 0.52,15.20,sepsis 0.53,15.30,sepsis 0.54,15.40,sepsis 0.55,15.50,sepsis 0.56,15.60,sepsis 0.57,15.70,sepsis 0.58,15.80,sepsis 0.59,16.00,sepsis 0.60,16.10,sepsis 0.61,16.20,sepsis 0.62,16.30,sepsis 0.63,16.50,sepsis 0.64,16.60,sepsis 0.65,16.80,sepsis 0.66,17.00,sepsis 0.67,17.10,sepsis 0.68,17.30,sepsis 0.69,17.50,sepsis 0.70,17.80,sepsis 0.71,18.00,sepsis 0.72,18.30,sepsis 0.73,18.60,sepsis 0.74,18.90,sepsis 0.75,19.20,sepsis 0.76,19.60,sepsis 0.77,20.00,sepsis 0.78,20.50,sepsis 0.79,21.00,sepsis 0.80,21.50,sepsis 0.81,22.10,sepsis 0.82,22.80,sepsis 0.83,23.50,sepsis 0.84,24.30,sepsis 0.85,25.00,sepsis 0.86,25.90,sepsis 0.87,26.70,sepsis 0.88,27.70,sepsis 0.89,28.70,sepsis 0.90,29.80,sepsis 0.91,31.00,sepsis 0.92,32.40,sepsis 0.93,33.90,sepsis 0.94,35.80,sepsis 0.95,38.30,sepsis """

Project file

Additional context

mikima commented 1 year ago

In your dataset, some of the lines are duplicated. By default, rawgraphs sums the values. You can change the beaviour by selecting "average" in the mapping part:

Screenshot 2023-06-05 at 12 33 34

The results is the one that you expect: viz (1)