@@ -702,7 +702,7 @@ function arrayTicks(ax) {
702
702
if ( ! Array . isArray ( text ) ) text = [ ] ;
703
703
704
704
// make sure showing ticks doesn't accidentally add new categories
705
- // TODO multicategory, if we allow ticktext / tickvals
705
+ // TODO multicategory, if we allow ticktext / fs
706
706
var tickVal2l = ax . type === 'category' ? ax . d2l_noadd : ax . d2l ;
707
707
708
708
// array ticks on log axes always show the full number
@@ -720,10 +720,14 @@ function arrayTicks(ax) {
720
720
}
721
721
}
722
722
723
+ if ( ax . _input && ax . _input . nticks ) {
724
+ ax . nticks = ax . _input . nticks ;
725
+ }
726
+
723
727
if ( j < vals . length ) ticksOut . splice ( j , vals . length - j ) ;
724
728
725
729
if ( ax . rangebreaks ) {
726
- // remove ticks falling inside rangebreaks
730
+ // remove ticks falling inside rangebreakstickVals
727
731
ticksOut = ticksOut . filter ( function ( d ) {
728
732
return ax . maskBreaks ( d . x ) !== BADNUM ;
729
733
} ) ;
@@ -2511,7 +2515,12 @@ axes.drawLabels = function(gd, ax, opts) {
2511
2515
// only so tex has predictable alignment that we can
2512
2516
// alter later
2513
2517
. attr ( 'text-anchor' , 'middle' )
2514
- . each ( function ( d ) {
2518
+ . each ( function ( d , i ) {
2519
+ if ( ax && ax . nticks
2520
+ && i != tickLabels [ 0 ] . length - 1
2521
+ && i != 0 && d . x % ax . nticks != 0 ) {
2522
+ return ;
2523
+ }
2515
2524
var thisLabel = d3 . select ( this ) ;
2516
2525
var newPromise = gd . _promises . length ;
2517
2526
0 commit comments