title: Heat Map not displaying correctly
body: <p>I'm trying to make a heat map for pokemon types vs against types and I'm having trouble plotting the table. I'm new to R by the way.</p>
  <p>Here is my code:</p>
  <pre><code>data %&gt;%
    select(Name, HP, Weight, Height, Att, Def, Spe, Spa, Spd, Type_1, Type_2, Abilities, Generation, Legendary, Catch_Rate) %&gt;%
    tibble()
  
  
  df_fight_against &lt;- select(data, Type_1, Against_Bug:Against_Water)
  head(df_fight_against)
  
  #1 find median amongagainst types
  df_fight_against_g &lt;- group_by(df_fight_against, Type_1)
  df_fight_against_summ &lt;- summarise(df_fight_against_g, 
                                     against_bug = mean(data$Against_Bug), 
                                     against_dark = mean(data$Against_Dark), 
                                     against_dragon = mean(data$Against_Dragon),
                                     against_electric = mean(data$Against_Electric),
                                     against_fairy = mean(data$Against_Fairy),
                                     against_fight = mean(data$Against_Fighting),
                                     against_fire = mean(data$Against_Fire),
                                     against_flying = mean(data$Against_Flying),
                                     against_ghost = mean(data$Against_Ghost),
                                     against_grass = mean(data$Against_Grass),
                                     against_ground = mean(data$Against_Ground),
                                     against_ice = mean(data$Against_Ice), 
                                     against_normal = mean(data$Against_Normal),
                                     against_poison  = mean(data$Against_Poison),
                                     against_psychic = mean(data$Against_Psychic),
                                     against_rock = mean(data$Against_Rock),
                                     against_steel = mean(data$Against_Steel),
                                     against_water = mean(data$Against_Water))
  
  
                                                                      
  
  
  #2 plot heat map
  df_fight_against_long &lt;- melt(df_fight_against_summ)
  hm.palette &lt;- colorRampPalette(rev(brewer.pal(9, 'RdYlBu')), space='Lab')
  ggplot(data=df_fight_against_long, aes(Type_1, variable)) + geom_tile(aes(fill=value)) + scale_fill_gradientn(colours = hm.palette(100)) + coord_equal() + theme(axis.text.x=element_text(angle=90, hjust=0)) + ggtitle(&quot;Effectiveness of different types of Pokemon&quot;)
  </code></pre>
  <p>Heres some example data:</p>
  <pre><code> Number             Name Type_1 Type_2                                 Abilities HP Att Def Spa Spd Spe BST      Mean Standard_Deviation Generation Experience_type Experience_to_level_100 Final_Evolution Catch_Rate Legendary Mega_Evolution Alolan_Form Galarian_Form Against_Normal
  1     12       Butterfree    Bug Flying                           ['Tinted Lens'] 60  45  50  90  80  70 395  65.83333          15.920811          1     Medium Fast                 1000000               1         45         0              0           0             0              1
  2       2          Ivysaur  Grass Poison               ['Chlorophyll', 'Overgrow'] 60  62  63  80  80  60 405  67.50000           8.902247          1     Medium Slow                 1059860               0         45         0              0           0             0              1
  3       3         Venusaur  Grass Poison               ['Chlorophyll', 'Overgrow'] 80  82  83 100 100  80 525  87.50000           8.902247          1     Medium Slow                 1059860               1         45         0              0           0             0              1
  </code></pre>
  <p>My problem is that when I plot this data in a heat map it should look like a checker board but I just have rows instead. Heres an image of what I'm getting:
  <a href="https://i.stack.imgur.com/cWGK6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cWGK6.png" alt="enter image description here" /></a></p>
  <p>Does anyone have any tips on how to fix this data?</p>