0

I have prepared a .dat file containing some numerical information of probability related a specific radial function. I want to depict these information in a contour plot like the attached figure. The figure is plotted in Mathematica, but I want to plot this figure with the prepared .dat file in latex. I don't know how I can figure it out. Could you please help me?

Best Regards,

Hadi.

enter image description here

1
  • 3
    Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – DG'
    Commented Apr 27, 2017 at 7:04

1 Answer 1

2

Before a pgfplots answer, here is how you get plots for free

\documentclass[tikz]{standalone}

\pgfdeclarefunctionalshading{probability amplitude}{\pgfpoint{-25bp}{-25bp}}{\pgfpoint{25bp}{25bp}}{}{
    % x y
    dup mul exch % y² x
    dup mul add % y²+x²
    sqrt % r
    dup 100 mul sin % r sin(100r)
    exch div % sin(100r)/r
    10 mul % 10sin(100r)/r
}
\begin{document}
    \tikz\path[shading=probability amplitude](-10,-10)rectangle(10,10);
\end{document}

2
  • Dear Symbol 1, I don't know why, but when I compile your code, It only shows me a black page!
    – AYBRXQD
    Commented Apr 29, 2017 at 11:16
  • @HadiSobhani That is because this is a viewer-dependent solution. And that is why you need to give us the raw data to play with.
    – Symbol 1
    Commented Apr 29, 2017 at 14:11

Not the answer you're looking for? Browse other questions tagged .