2

This question already has an answer here:

My question is different from that question. I'd like to randomly draw a number of dots with different colors and sizes, for example, 50 dots, 60 dots... It will be better if these dots can distribute in a circle.

    \documentclass{article}
    \usepackage{tikz,pgfmath}
    \begin{document}
    \thispagestyle{empty}
    \begin{pgfpicture}
    \pgfmathdeclarerandomlist{color}{{red}{blue}{green}{yellow}{white}}
    \foreach \a in {1,...,50}{
    \pgfmathrandominteger{\x}{1}{200}
    \pgfmathrandominteger{\y}{1}{200}
    \pgfmathrandominteger{\r}{5}{10}
    \pgfmathrandomitem{\c}{color}
    \pgfpathcircle{\pgfpoint{+\x pt}{+\y pt}}{+\r pt}
    \color{\c!40!white}
    \pgfsetstrokecolor{\c!80!black}
    \pgfusepath{stroke, fill}
    }
    \end{pgfpicture}
    \end{document} 

Example output:

enter image description here

marked as duplicate by CarLaTeX, Werner, Stefan Pinnow, Zarko tikz-pgf Feb 4 '17 at 8:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.