On Mon 21.Mar'11 at 1:59:44 +0100, schier wrote: > Hi, Hi Janm > I'd like to make a scatterplot in pgfplots with data from a datafile, > with one (black) color of all marks-circles, but with the mark size > (diameter) dependent on the third column in the datafile. In gnuplot > (original implementation), this reads (for blue marker color): > plot "ColsArea.txt" using 1:2:3 with points pt 6 pointsize variable lt > rgb "blue"
I once made an example I wanted to upload at texample.net - couldn't get so far
yet.
Anyway take a look at this samplecode:
1 \documentclass{article}
2 \usepackage{amsmath}
3 \usepackage{siunitx}
4 \usepackage{tikz}
5 \usepackage{pgfplots}
6
7 \begin{document}
8 \begin{tikzpicture}[>=latex]
9 \begin{axis}[width=.5\textwidth,
10 height=7cm,
11 grid=major,
12 point meta=explicit,
13 scatter/@pre marker code/.code={%
14 \pgfmathparse{\pgfplotspointmetatransformed/200}%
15 \def\markopts{mark=o,fill=blue,mark
size=\pgfmathresult}%
16 \expandafter\scope\expandafter[\markopts]
17 },%
18 scatter/@post marker code/.code={\endscope}
19 ]
20 \addplot[only marks,mark=o*,scatter,blue]
21 table[x index=0, y index=1, meta index=2]
22 {data.dat};
23 \end{axis}
24 \end{tikzpicture}
25 \end{document}
The result should look like this:
<http://pubgit.xeroc.org/?p=tikz.git;a=blob_plain;f=TagCloud/main.pdf;hb=6c016a9b282add02bd224e90068e5a262a13bdb5>
> Best regards,
> Jan
Regards
-- Fabian Schuh
--------------------------------
Key fingerprint: DA03 EB3C 2A49 AD7D 6128 9168 F253 8A4B 282D 6238
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Pgfplots-features mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pgfplots-features
