automeris-io / WebPlotDigitizer

Computer vision assisted tool to extract numerical data from plot images.
https://automeris.io
GNU Affero General Public License v3.0
2.67k stars 363 forks source link

Feature Request: Give error when a scale is log and any calibration point is not positive #197

Open billdenney opened 4 years ago

billdenney commented 4 years ago

While working on #192, I found an issue extracting from a rotated bar graph.

All "value" items are null in the extraction. Note the values in the dataset name "Bar rotated 1". wpd_all_types.txt

This is arbitrarily created on top of the image that is initially loaded with the first load of WPD (though the actual points were random clicks).

ankitrohatgi commented 4 years ago

Works fine for me. I attached my project files from both vertical and horizontal cases

projects.zip

billdenney commented 4 years ago

This is my fault...

I started to go into detail of what exactly I did to cause the issue, but then I noticed that I did something less intelligent.

The issue was that I checked log scale and had a calibration point at 0. That is definitely a user error. As you can possibly tell, I was going through all options on all axis types to document the format. So, I wasn't really paying attention to what the options were that I was using.

Perhaps WPD should only allow positive values for log-scale calibration and give an error when an attempt is made to calibrate with zero or a negative value and log scale.