title: How can I change the shape in geom_dotplot and see all the dot is the same frame?
body: <p>I want to use geom_dotplot to distinguish two different variables by shape of the dots and two categories with color. For example I have this dataset:</p>
  
  <pre><code>Position    phaseGroup  phaseGroup_2    phaseGroup_3    Synonymous  Information Phasing Pha_Syn Grouped yPos
  5.85E+04    1   1   1   16  1.1 Phased  Phased-16   1   1
  5.96E+04    1   1   1   16  1.1 Phased  Phased-16   1   2
  6.22E+04    1   1   1   16  1.1 Phased  Phased-16   1   3
  6.26E+04    1   1   1   16  1.1 Phased  Phased-16   1   4
  7.22E+04    NA  1   1   16  1.NA    Unphased    Unphased-16 1   5
  7.30E+04    1   1   1   16  1.1 Phased  Phased-16   1   6
  2.03E+05    2   2   2.1 16  1.2 Phased  Phased-16   1   7
  2.48E+05    2   2   2.1 1   1.2 Phased  Phased-1    1   8
  2.53E+05    2   2   2.1 16  1.2 Phased  Phased-16   1   9
  2.53E+05    2   2   2.1 16  1.2 Phased  Phased-16   1   10
  2.54E+05    2   2   2.1 16  1.2 Phased  Phased-16   1   11
  2.54E+05    2   2   2.1 16  1.2 Phased  Phased-16   1   12
  2.54E+05    NA  2   2.2 16  1.NA    Unphased    Unphased-16 1   13
  2.55E+05    2   2   2.2 16  1.2 Phased  Phased-16   1   14
  2.56E+05    2   2   2.2 16  1.2 Phased  Phased-16   1   15
  2.58E+05    2   2   2.2 16  1.2 Phased  Phased-16   1   16
  2.61E+05    2   2   2.2 16  1.2 Phased  Phased-16   1   17
  5.76E+05    3   3   3.1 16  1.3 Phased  Phased-16   1   18
  5.77E+05    3   3   3.1 16  1.3 Phased  Phased-16   1   19
  5.77E+05    3   3   3.1 16  1.3 Phased  Phased-16   1   20
  5.79E+05    3   3   3.1 16  1.3 Phased  Phased-16   1   21
  6.22E+05    3   3   3.1 16  1.3 Phased  Phased-16   1   22
  6.23E+05    3   3   3.1 1   1.3 Phased  Phased-1    1   23
  6.24E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   24
  6.25E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   25
  6.26E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   26
  6.27E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   27
  6.29E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   28
  6.29E+05    3   3   3.2 16  1.3 Phased  Phased-16   1   29
  6.31E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   30
  6.32E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   31
  6.32E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   32
  6.34E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   33
  6.35E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   34
  6.37E+05    3   3   3.3 16  1.3 Phased  Phased-16   1   35
  6.76E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   36
  6.82E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   37
  7.40E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   38
  7.57E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   39
  7.60E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   40
  7.61E+05    3   3   3.4 16  1.3 Phased  Phased-16   1   41
  7.61E+05    3.5 3.5 3.5 16  2.1 Phased  Phased-16   2   41.5
  2.03E+06    4   4   4   16  3.4 Phased  Phased-16   3   42
  2.10E+06    4   4   4   1   3.4 Phased  Phased-1    3   43
  2.15E+06    4   4   4   16  3.4 Phased  Phased-16   3   44
  2.16E+06    4   4   4   16  3.4 Phased  Phased-16   3   45
  2.16E+06    4   4   4   16  3.4 Phased  Phased-16   3   46
  2.16E+06    4   4   4   16  3.4 Phased  Phased-16   3   47
  2.17E+06    4   4   4   1   3.4 Phased  Phased-1    3   48
  2.18E+06    NA  4   4   1   3.NA    Unphased    Unphased-1  3   49
  2.36E+06    5   5   5   16  3.5 Phased  Phased-16   3   50
  2.36E+06    5   5   5   16  3.5 Phased  Phased-16   3   51
  2.37E+06    5   5   5   16  3.5 Phased  Phased-16   3   52
  2.37E+06    5   5   5   1   3.5 Phased  Phased-1    3   53
  2.37E+06    5   5   5   1   3.5 Phased  Phased-1    3   54
  2.37E+06    5   5   5   16  3.5 Phased  Phased-16   3   55
  2.37E+06    5   5   5   16  3.5 Phased  Phased-16   3   56
  2.37E+06    5   5   5   1   3.5 Phased  Phased-1    3   57
  2.50E+06    5   5   5   16  3.5 Phased  Phased-16   3   58
  2.50E+06    5   5   5   16  3.5 Phased  Phased-16   3   59
  2.53E+06    5   5   5   1   3.5 Phased  Phased-1    3   60
  2.54E+06    5   5   5   16  3.5 Phased  Phased-16   3   61
  2.54E+06    5   5   5   1   3.5 Phased  Phased-1    3   62
  2.56E+06    5   5   5   16  3.5 Phased  Phased-16   3   63
  2.60E+06    5   5   5   16  3.5 Phased  Phased-16   3   64
  2.62E+06    5   5   5   16  3.5 Phased  Phased-16   3   65
  3.04E+06    NA  5   5   1   4.NA    Unphased    Unphased-1  4   66
  3.17E+06    NA  5   5   1   4.NA    Unphased    Unphased-1  4   67
  3.84E+06    NA  5   5   16  4.NA    Unphased    Unphased-16 4   68
  4.00E+06    6   6   6   16  5.6 Phased  Phased-16   5   69
  4.00E+06    6   6   6   16  5.6 Phased  Phased-16   5   70
  4.00E+06    6   6   6   16  5.6 Phased  Phased-16   5   71
  4.00E+06    6   6   6   1   5.6 Phased  Phased-1    5   72
  4.00E+06    6   6   6   16  5.6 Phased  Phased-16   5   73
  4.00E+06    NA  6   6   16  5.NA    Unphased    Unphased-16 5   74
  4.00E+06    NA  6   6   16  5.NA    Unphased    Unphased-16 5   75
  4.00E+06    7   7   7   16  5.7 Phased  Phased-16   5   76
  4.00E+06    7   7   7   16  5.7 Phased  Phased-16   5   77
  4.00E+06    7   7   7   1   5.7 Phased  Phased-1    5   78
  4.00E+06    7   7   7   1   5.7 Phased  Phased-1    5   79
  4.00E+06    7   7   7   16  5.7 Phased  Phased-16   5   80
  4.00E+06    7   7   7   16  5.7 Phased  Phased-16   5   81
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   82
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   83
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   84
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   85
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   86
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   87
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   88
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   89
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   90
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   91
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   92
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   93
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   94
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   95
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   96
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   97
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   98
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   99
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   100
  4.00E+06    8   8   8   16  5.8 Phased  Phased-16   5   101
  4.01E+06    8   8   8   16  5.8 Phased  Phased-16   5   102
  4.01E+06    8   8   8   16  5.8 Phased  Phased-16   5   103
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   104
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   105
  4.01E+06    NA  9   9   16  5.NA    Unphased    Unphased-16 5   106
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   107
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   108
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   109
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   110
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   111
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   112
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   113
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   114
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   115
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   116
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   117
  4.01E+06    9   9   9   16  5.9 Phased  Phased-16   5   118
  4.01E+06    NA  9   9   1   5.NA    Unphased    Unphased-1  5   119
  4.02E+06    9   9   9   16  5.9 Phased  Phased-16   5   120
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   121
  4.02E+06    10  10  10  16  5.1 Phased  Phased-16   5   122
  4.02E+06    NA  10  10  1   5.NA    Unphased    Unphased-1  5   123
  4.02E+06    10  10  10  16  5.1 Phased  Phased-16   5   124
  4.02E+06    10  10  10  16  5.1 Phased  Phased-16   5   125
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   126
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   127
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   128
  4.02E+06    NA  10  10  1   5.NA    Unphased    Unphased-1  5   129
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   130
  4.02E+06    10  10  10  1   5.1 Phased  Phased-1    5   131
  4.02E+06    10  10  10  16  5.1 Phased  Phased-16   5   132
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   133
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   134
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   135
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   136
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   137
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   138
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   139
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   140
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   141
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   142
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   143
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   144
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   145
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   146
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   147
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   148
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   149
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   150
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   151
  4.03E+06    NA  10  10  16  5.NA    Phased  Phased-16   5   152
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   153
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   154
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   155
  4.03E+06    10  10  10  16  5.1 Phased  Phased-16   5   156
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   157
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   158
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   159
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   160
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   161
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   162
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   163
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   164
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   165
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   166
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   167
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   168
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   169
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   170
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   171
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   172
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   173
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   174
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   175
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   176
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   177
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   178
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   179
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   180
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   181
  4.04E+06    10  10  10  1   5.1 Phased  Phased-1    5   182
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   183
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   184
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   185
  4.04E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   186
  4.04E+06    10  10  10  16  5.1 Phased  Phased-16   5   187
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   188
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   189
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   190
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   191
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   192
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   193
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   194
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   195
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   196
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   197
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   198
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   199
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   200
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   201
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   202
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   203
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   204
  4.05E+06    10  10  10  16  5.1 Phased  Phased-16   5   205
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   206
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   207
  4.05E+06    10  10  10  1   5.1 Phased  Phased-1    5   208
  4.59E+06    NA  10  10  16  5.NA    Unphased    Unphased-16 5   209
  </code></pre>
  
  <p>I run the following command line:</p>
  
  <pre><code>library(ggplot2)
  ggplot(A, aes(x = factor(Grouped), y = phaseGroup_2, fill = factor(Phasing))) + 
    geom_dotplot(binaxis="y",stackdir = "center", dotsize = 0.3) + 
    theme_minimal()
  </code></pre>
  
  <p>and generated the figure in attachment.</p>
  
  <p><a href="https://i.stack.imgur.com/xVyqx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xVyqx.jpg" alt="PhasedGroups Data Based on Grouped Categories"></a></p>
  
  <p>However, I'd like to do two things on this figure as you can see Group 5 at y=10 I can't see all the dots but if I make the dots smaller I can't see the color. Secondly, I would like to change the shapes of the figure according to the <code>Synonymous</code> column (1 - open circle and 16 - closed circle). </p>
  
  <p>My question is how I can change the shape of the dots and optimized the figure in a way that I can see all the dots? Important note is that I would like to keep the same number of horizontal data meaning that as you can see in group 1 I have three horizontal data points and in group 2 only one.</p>
  
  <p>Is there any way to optimize this figure and do I need to try another command line in ggplot?</p>