plotly / documentation

Issue tracker for Plotly's open-source documentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibly incorrect Violin attributes/values in example.

hmf opened this issue · comments

commented

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.

commented

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"
}