title: How do I get the dates to render correctly in a ggplot using the 'bdscale' package
body: <p>I successfully removed unwanted dates in a plot using the 'bdscale' packaget that were causing a known smooth curve to render in a jagged fashion due to weekends and holidays being accounted for on the x-axis.  See <a href="https://stackoverflow.com/questions/32893176/ggplot2-remove-blank-space-for-weekends-and-holidays-from-x-axis-dates">ggplot2: remove blank space for weekends and holidays from x-axis dates</a>.  However, now my Dates no longer render correctly.  I am certain there is an easy fix, but the solution escapes me.  Any assistance is greatly appreciated.</p>
  <p>The csv file is located at my github site <a href="https://github.com/123blee/123blee.github.io/blob/main/data1.csv" rel="nofollow noreferrer">https://github.com/123blee/123blee.github.io/blob/main/data1.csv</a> and I call the dataframe 'xxx' in the code.</p>
  <p><a href="https://i.stack.imgur.com/3DXCg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3DXCg.jpg" alt="enter image description here" /></a></p>
  <pre><code>
  library(plotly)
  library(bdscale)
  library(scales)
  
  # Data file - https://github.com/123blee/123blee.github.io/blob/main/data1.csv
  # https://stackoverflow.com/questions/32893176/ggplot2-remove-blank-space-for-weekends-and-holidays-from-x-axis-dates
    
    ggplotly(
      ggplot(data = xxx, aes(x = Date)) + 
        geom_line(aes(y = a), color = &quot;blue&quot;) + 
        geom_line(aes(y = b), color=&quot;black&quot;) +
        theme(panel.grid.minor = element_line(colour=&quot;white&quot;, size=0.2)) +
        scale_x_bd(business.dates=xxx$Date, max.major.breaks=10) +  
        ylim( 10, 25 )  
      
    )
     
  
  </code></pre>