Looking for 2D artificial data to demonstrate properties of clustering algorithms I am looking for datasets of 2 dimensional datapoints (each datapoint is a vector of two values (x,y)) following different distributions and forms. Code to generate such data would also be helpful. I want to use them to plot / visualise how some clustering algorithms perform. Here are some examples:


*

*star like cloud data

*four clusters, one easy seperable 

*a spiral (no cluster)

*a ring

*two barely seperated clouds

*two parallel clusters forming a spiral

*... etc

 A: Here are some datasets designed exactly for this task:
The Fundamental Clustering Problem Suite by Ultsch 
A: This toy clustering benchmark contains various data sets in ARFF format (could be easily converted to CSV), mostly with ground truth labels. The benchmark should validate basic desired properties of clustering algorithms. Most of the data sets comes from the clustering papers like:


*

*BIRCH - Zhang, Tian, Raghu Ramakrishnan, and Miron Livny. "BIRCH: an efficient data clustering method for very large databases." ACM SIGMOD Record. Vol. 25. No. 2. ACM, 1996.

*CURE - Guha, Sudipto, Rajeev Rastogi, and Kyuseok Shim. "CURE: an efficient clustering algorithm for large databases." ACM SIGMOD Record. Vol. 27. No. 2. ACM, 1998.

*Chameleon - Karypis, George, Eui-Hong Han, and Vipin Kumar. "Chameleon: Hierarchical clustering using dynamic modeling." Computer 32.8 (1999): 68-75.

*The Fundamental Clustering Problem Suite - Ultsch, A.: Clustering with SOM: U*C, In Proc. Workshop on Self-Organizing Maps, Paris, France, (2005) , pp. 75-82

*MOCK - Handl, Julia, and Joshua Knowles. "An evolutionary approach to multiobjective clustering." Evolutionary Computation, IEEE Transactions on 11.1 (2007): 56-76.

*Robust path-based spectral clustering - Chang, Hong, and Dit-Yan Yeung. "Robust path-based spectral clustering." Pattern Recognition 41.1 (2008): 191-203.




A: R comes with a lot of datasets, and it looks like it would not be a big deal to reproduce most of the examples you cited with few lines of code. You may also find the mlbench package useful, in particular synthetic datasets starting with mlbench.*. Some illustrations are given below.

You will find additional examples by looking at the Cluster Task View on CRAN. For example, the fpc package has a built-in generator for "face-shaped" clustered benchmark datasets (rFace).  

Similar considerations apply to Python, where you will find interesting benchmark tests and datasets for clustering with the scikit-learn.
The UCI Machine Learning Repository hosts a lot of datasets as well, but you're better off simulating data yourself with the language of your choice.
A: ELKI comes with a couple of data sets (check also the unit tests, they contain many more than those on the web site, along with parameter settings).
It also includes a fairly flexible data generator.
A: Here is a customizable cluster generator. It only addresses a certain class of data sets, but it can surely be used for cluster algorithm investigations.
Here is an example of the kind of clusters it can create:  

Cluster affiliation is saved in a text file. The code is open source under MIT license.
A: This Matlab script generates 2D data for clustering. It accepts several parameters so that the generated data is within user requirements.
A: I can't believe that nobody has mentioned Fisher's Iris data.  
I don't think I've seen a clustering technique that doesn't use the iris data as an example.
In r, just type "iris" to access the data.
Here's an example of a nice (and typical) iris plot:
http://ygc.name/2011/12/24/ml-class-7-kmeans-clustering/
