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

Fixing "True" Scatter Plot from CSV #13

Open
AdityaSavara opened this issue Mar 8, 2023 · 0 comments
Open

Fixing "True" Scatter Plot from CSV #13

AdityaSavara opened this issue Mar 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@AdityaSavara
Copy link
Owner

Currently, the default XY scatter plot is actually a spline.
To change, one has to use the "mode" field.
https://plotly.com/python/line-charts/
Some possible modes are:
mode = "lines" // I believe this is straight lines connected plot
mode = "markers" // This is a conventional scatter plot (markers with no lines)
mode = "lines+markers"

We should be able to do all of the above as well as things like dashes through our JSON.
These capabilities should be extendable to CSV by using our SchemaTemplate feature. However, it is not working as expected and needs to be debugged.

To see the problem, use the following few files while clearing data after each file.

(1) Here is a CSV file with some data that gets plotted in a way that's undesirable, since this data is better represented as a true scatter plot.
Scaling_data_100_Ashi.csv
(2) Here is that data as a json (I have removed the json file extension because github won't allow that extension here)
Scaling_data_100.txt

(3) Here is that data as a Json which has been modified to plot th
Scaling_data_100_marker.txt
e data as markers (a conventional scatter plot).

(4) Here is a CSV where I have declared the datatype to be "MarkerPlot", but which does not result in a plot in JSONGrapher, even though it should make a scatter plot if everything is working correctly.
Scaling_data_100_Marker.csv

The last file should make a scatter plot because I declared the DataType to be MarkerPlot and because the MarkerPlot Schema and Template exist (links below). So the settings should be loaded from those files. In fact, JSONGrapher seems to be "trying" to get the settings from the MarkerPlot file, because no error message is posted. And, if one takes the 4th file (Scaling_data_100_Marker.csv) and changes the DataType field to something else, then a plot does appear. So it seems some debugging needs to be done about why the schema template is not creating a json that is similar enough to Scaling_data_100_marker.txt to enable the plot to occur.
https://github.com/AdityaSavara/JSONGrapher/blob/main/schema/MarkerPlot.schema.template.json
https://github.com/AdityaSavara/JSONGrapher/blob/main/schema/MarkerPlot.schema.json

@AdityaSavara AdityaSavara added the bug Something isn't working label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant