Skip to content

cliponaxis: false fails with date & log axes #2002

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

Closed
alexcjohnson opened this issue Sep 13, 2017 · 2 comments
Closed

cliponaxis: false fails with date & log axes #2002

alexcjohnson opened this issue Sep 13, 2017 · 2 comments
Assignees
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

markers and text disappear when you use cliponaxis: false with a date axis:

var x = [];
var y = [];
for(var i = 1; i < 8; i++)
{
  x.push('2017-11-' + i);
  y.push(Math.floor(Math.random() * 10000));
}

Plotly.newPlot(gd,
  [{
      x: x,
      y: y,
      type: 'scatter',
      text: y,
      fill: 'tonexty',
      mode: 'lines+markers+text',
      textposition: 'top',
      cliponaxis: false
  }],
  {width: 400, height: 400}
);

screen shot 2017-09-13 at 10 18 18 am
also fails with log axes, but works fine if the x axis is either linear or category:

var x = [];
var y = [];
for(var i = 1; i < 8; i++)
{
  x.push(String.fromCharCode(i+64));
  y.push(Math.floor(Math.random() * 10000));
}

Plotly.newPlot(gd,
  [{
      x: x,
      y: y,
      type: 'scatter',
      text: y,
      fill: 'tonexty',
      mode: 'lines+markers+text',
      textposition: 'top',
      cliponaxis: false
  }],
  {width: 400, height: 400}
);

screen shot 2017-09-13 at 10 22 26 am

discovered while investigating #2000

@alexcjohnson alexcjohnson added the bug something broken label Sep 13, 2017
@etpinard
Copy link
Contributor

Oh well, this is dumb. My mistake. Adding d2r() should do the trick.

@alexcjohnson
Copy link
Collaborator Author

Adding d2r() should do the trick.

Will probably have to be d2c for x/y and r2c for range (can we trust ax._rl to exist?) but yeah. And calendars 🙄

@etpinard etpinard self-assigned this Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants