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

Non steady datapoints #13

Open
tranquvis opened this issue Apr 9, 2019 · 1 comment
Open

Non steady datapoints #13

tranquvis opened this issue Apr 9, 2019 · 1 comment

Comments

@tranquvis
Copy link

Hey @PrateekKumarSingh ,

The graph is already great, if the data is in the correct range and the values are steady.

The problem

However in my case for example I hat to do a time complexity analysis for an algorithm.
Varying the value linear is not really an option because this takes very long, so I multiplied by 4 each time.

I have the following data:

2 8 32 128 512
1287.7 838.5 1057.2 1027.2 1243.3

The time in the second row is the real data I would like to visualize, but doing this directly would not be really good, because the curve is much easier to interpret when the x value of the graph is proportional to the represented value.

The next problem was that the graph doesn't scale to fit the window vertically as well as horizontally.

My quick solution

My fast solution is to transform the data before visualizing.
I did this by setting a fixed width and dividing my x axis into segments with equal width.
I then check for each segment if a datapoint is in it. I set the new datapoint to the old one if its in the segment, otherwise I set it to 0. (Alternatively the datapoint could be interpolated)

I also scaled the new datapoints in the y axis so that the maximum hits the height.

My solution works quite well. The only problem is that the labels are not correct then.

I could think of many scenarios, where some kind of linearization and scaling could be useful.
I am not sure how exactly this feature should be implemented, but it would be really awesome.

I can share some code on demand or maybe some day I am motivated and implement the feature myself. 😅

Thanks for this great module!

@tranquvis
Copy link
Author

My solution:
Convert-DataPoints

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