Hi Mahmood,
Without a reproducible example, or your data, it's a bit tricky to
diagnose what might be wrong.
I suggest that you could start by seeing what happens when you do
the two plots (ie with either geom_violin or geom_dotplot) separately,
without the ylim.
I haven't used geom_dotplot, and it looks like the error probably
relates to that, so I'd then play around until I had geom_dotplot doing
what I wanted before trying to combine it with geom_violin. (And I'm
struggling to think how the two plots go together, won't one of the axes
have conflicting scales?).
Best wishes,
Ron.