I have lots of data to be plotted(around 100000 points) in a single plot. But pgfplot is giving me error. What is the maximum limit(of points) for it to plot. But gnuplot is giving me the plot whereas pgfplot doesn't.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
100000 points is usually beyond the capabilities of pgfplots (unless with extreme memory settings, perhaps disabling markers).
An alternative approach which satisfies memory limits (and your patience while running latex) and still uses pgfplots for the axis descriptions is to employ its
\addplot graphics method: there, you can generate the visualization (scatter plot?) with gnuplot, but you configure gnuplot to EXCLUDE any axis. Then, you include the generated graphics (as
.png) into pgfplots, configuring only the data limits. PGFPlots will then include the graphics and will overlay its axis descriptions automatically (based on your supplied data limits). The pgfplots manual contains an example (even one which takes its image data from gnuplot output).
I think in this case I'd decimate the data before sending it to pgfplot. Consider that if your graph is, say, at most 10cm wide, having that many data points means they could be as close together as one micrometer, which you'll certainly never be bake to discern in the output.
With the default memory limits in TeXLive 2009 (3000000), I determined the limit to be 12175 points using only points (no lines). The number can vary depending on other plots in the same page and other factors, like point decorations. See the comments in How can one predict pgfplots memory overload?