title: Single option in scale_fill_stepsn changes color rendering in legend
body: <p>I'm using ggplot's scale_fill_stepsn to generate a map with a stepped scale.  When I use the option n.breaks the colors specified render properly in the legend.  n.breaks calculates the breaks based on the number of breaks specified.   However, when I use the option to manually specify the breaks with the same number of breaks used in n.breaks, the color rendering in the legend changes and are not rendered properly.</p>
  <p>This does not make sense.  Can this be fixed such that the legend colors in the second example look like that in the first?</p>
  <pre><code>library(urbnmapr)
  library(ggplot2)
  library(dplyr)
  library(ggthemes)
  
  # Set colors 
  red   &lt;- c(0.67, 0.75, 0.84, 0.92, 1,    1,    0.8, 0.53, 0,   0,    0,   0)
  green &lt;- c(0.25, 0.4,  0.56, 0.71, 0.86, 1,    1,   0.95, 0.9, 0.75, 0.6, 0.48)
  blue  &lt;- c(0.11, 0.18, 0.25, 0.33, 0.4,  0.45, 0.4, 0.27, 0,   0,    0,   0)
  
  # Obtain county polygon data
  states_sf &lt;- get_urbn_map(map = &quot;states&quot;, sf = TRUE)
  counties_sf &lt;- get_urbn_map(map = &quot;counties&quot;, sf = TRUE)
  
  # Assign random values of data to each count  
  counties_sf$value = runif(length(counties_sf$county_fips), min=-3.0, max=3.0)
  
  # Remove AK and HI - lower 48 only 
  states_sf &lt;- states_sf[!(states_sf$state_abbv %in% c(&quot;HI&quot;,&quot;AK&quot;)),]
  counties_sf &lt;- counties_sf[!(counties_sf$state_abbv %in% c(&quot;HI&quot;,&quot;AK&quot;)),]
  
  # Plot county-level data with a discrete legend 
  
  data_levels &lt;- c(-3,-1.5, -0.8, -0.5, -0.25,-0.1,0.1,0.25,0.5,.8,1.5,3)
  level_colors &lt;- rgb(red, green, blue)
  
  length(data_levels)
  length(level_colors)
  
  
  # First version - 
  counties_sf %&gt;%
    ggplot() +
    # Overlay State Outlines
    # Plot county data and fill with value
    geom_sf(mapping = aes(fill = value), color = NA) +
    geom_sf(data = states_sf, fill = NA, color = &quot;black&quot;, size = 0.25) +
    # Remove grid lines from plot
    coord_sf(datum = NA) +
    #
    # THE FIRST OPTION of scale_fill_stepsn IS WHERE THEY ARE DIFFERENT 
    #
    scale_fill_stepsn(n.breaks=12, colors=level_colors, limits=c(-3,3), 
                      labels=scales::label_number(accuracy=0.1)) + 
    labs(title='This Data is Completely Random', 
         fill ='The Legend') + 
    theme_map() + 
    theme(legend.position = &quot;bottom&quot;,
          legend.key.width=unit(1.5,&quot;cm&quot;),
          legend.box.background = element_rect(color=&quot;black&quot;, size=2),
          legend.title = element_text(face = &quot;bold&quot;),
          legend.spacing = unit(0.25,&quot;cm&quot;),
          legend.justification = &quot;center&quot;,
          plot.title=element_text(hjust=0.5))  +
    guides(fill = guide_colorsteps(even.step=TRUE, 
                                   title.position=&quot;top&quot;, 
                                   title.hjust = 0.5,
                                   frame.colour = 'black', 
                                   barwidth=unit(250,'points'),
                                   axis.linewidth=unit(3,'points')))
  </code></pre>
  <p>This yields:
  <a href="https://i.stack.imgur.com/7ivKI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7ivKI.png" alt="enter image description here" /></a></p>
  <pre><code>#  
  # Second version - 
  counties_sf %&gt;%
    ggplot() +
    # Overlay State Outlines
    # Plot county data and fill with value
    geom_sf(mapping = aes(fill = value), color = NA) +
    geom_sf(data = states_sf, fill = NA, color = &quot;black&quot;, size = 0.25) +
    # Remove grid lines from plot
    coord_sf(datum = NA) +
    #
    # THE FIRST OPTION of scale_fill_stepsn IS WHERE THEY ARE DIFFERENT
    # replaced n.breaks with breaks option
    #
    scale_fill_stepsn(breaks=data_levels, colors=level_colors, limits=c(-3,3), 
                      labels=scales::label_number(accuracy=0.1)) + 
    labs(title='This Data is Completely Random', 
         fill ='The Legend') + 
    theme_map() + 
    theme(legend.position = &quot;bottom&quot;,
          legend.key.width=unit(1.5,&quot;cm&quot;),
          legend.box.background = element_rect(color=&quot;black&quot;, size=2),
          legend.title = element_text(face = &quot;bold&quot;),
          legend.spacing = unit(0.25,&quot;cm&quot;),
          legend.justification = &quot;center&quot;,
          plot.title=element_text(hjust=0.5))  +
    guides(fill = guide_colorsteps(even.step=TRUE, 
                                   title.position=&quot;top&quot;, 
                                   title.hjust = 0.5,
                                   frame.colour = 'black', 
                                   barwidth=unit(250,'points'),
                                   axis.linewidth=unit(3,'points')))
  </code></pre>
  <p>This version yields the following image.   Notice the colors in the legend are now different.
  <a href="https://i.stack.imgur.com/Gvg7G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gvg7G.png" alt="enter image description here" /></a></p>