# How to draw a punchcard in Latex [duplicate]

I would like to draw a punchcard in Latex as shown below. But i just can't find any information how to do this (not even in the manual of tikz). The only thing i can find is information about bubble charts (with x and y axis) I would like to get the data from a csv-file, for example with the command:

\addplot table {table.csv}


Link to my data as .ods-file: https://www.dropbox.com/s/3qgdh9klo2xpxcz/punchcard.ods

Source of that image is the article of Maalej and Robillard: Patterns of knowledge in API reference documentation

• First, do you have this data? Second, this is named a "punchcard" and I once post helpful answer for you. I can adjust it for you, if you share the data. – m0nhawk Aug 4 '14 at 14:30
• Just for curiousity: what is the meaning of the different sizes and colors? – Uwe Ziegenhagen Aug 4 '14 at 15:05
• the different sizes are for different absolute values (like 1 is small and 100 is big). In this example black points are for positive values and gray are for negative ones. – svenwildermann Aug 4 '14 at 15:08
• @m0nhawk still willing to help me out? :) – svenwildermann Aug 4 '14 at 22:11
• Where is the command \addplot defined? Also, rather than giving a link to a dropbox folder it would be more helpful if you showed us the first few lines of the data file. Also, please consider adding a minimal working example. – Andrew Aug 5 '14 at 5:31

As a workaround you can use my old code with a converted data:

\documentclass{standalone}

\usepackage{mathpazo}
\usepackage{pgfplots}

\definecolor{skyblue}{rgb}{0.447,0.624,0.812}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
grid=major,
point meta=explicit,
scatter/@pre marker code/.code={
\pgfmathparse{
\pgfplotspointmetatransformed/1000*50+50}
\let\opacity=\pgfmathresult
\pgfmathparse{
\pgfplotspointmetatransformed/1000*6.5+1}
\def\markopts{
mark=*,
color=skyblue!\opacity,
fill=skyblue!\opacity,
mark size=\pgfmathresult}
\expandafter\scope\expandafter[\markopts]},
scatter/@post marker code/.code={
\endscope},
symbolic x coords={Type2,Type3,Type4,Type5,Type6,Type7,Type8,Type9,Type10,Type11,Type12},
symbolic y coords={Type12,Type11,Type10,Type9,Type8,Type7,Type6,Type5,Type4,Type3,Type2,Type1}]

• @sv0101 Oh, also I forget the Type11 Type12 12. Sorry for that, just add it and update. – m0nhawk Aug 6 '14 at 10:17