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

Possibly incorrect Violin attributes/values in example. #1676

Open
hmf opened this issue Mar 9, 2020 · 1 comment
Open

Possibly incorrect Violin attributes/values in example. #1676

hmf opened this issue Mar 9, 2020 · 1 comment

Comments

@hmf
Copy link

hmf commented Mar 9, 2020

Background: I am using the schema to auto-generate Scala code to read and generate the Plotly JSON documents. I have started with the Violin trace examples for preliminary tests. I have found that:

  • The attribute: points: 'none' does not exist in the schema. The schema points is an enumerated that only has the following values:
    • “all”
    • “outliers”
    • “suspectedoutliers”
    • false
  • The element "boxpoints": false does not appear in the Violin trace. The only place I find this is in the box trace.

This seems to be incorrect documentation.

@hmf
Copy link
Author

hmf commented Mar 10, 2020

While I am at it, this examples also has the following minor issues:

  • title has been deprecated so the text field should be used
  • The keys and strings are not enclosed in double quotes which makes copy & paste cumbersome. Don't know if adding the double quotes is valid JS.
  • We have spurious commas in the last JSON values. Again I don't know if this is valid JS.

Here is the relevant snippet:

var layout = {
  title: "Split Violin Plot",
  yaxis: {
    zeroline: false
  },
  violingap: 0,
  violingroupgap: 0,
  violinmode: "overlay",
}

And here is the corrected version:

var layout = {
  "title": {
    "text":"Split Violin Plot",
    "font": {
      "family": "Courier New, monospace",
      "size": 24
    },
    "xref": "paper",
    "x": 0.05
  },
  "yaxis": {
    "zeroline": false
  },
  "violingap": 0,
  "violingroupgap": 0,
  "violinmode": "overlay"
}

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