Graphics, Figures & TablesSurface plot with pgfplots

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mgulin
Posts: 18
Joined: Thu May 31, 2012 7:16 pm

Surface plot with pgfplots

Post by mgulin »

Hi all!
I'm trying to plot a surface using pgfplots. Here is the MATLAB-generated surface plot, that is what I'm trying to get with pgfplots:
MATLAB.png
MATLAB.png (38.63 KiB) Viewed 2566 times
What I'm getting with pgfplots is this:
pgfplots.png
pgfplots.png (90.73 KiB) Viewed 2566 times
Please find attached the .tex code and the .txt file with data.

P.S. I also have GNU plots installed on my machine, but I didn't manage to get what I want here.

Any help is more than welcome. Thank you in advance! :)

-Marko
Attachments
single_diode_surface.tex
(1.31 KiB) Downloaded 260 times
single_diode_surface.txt
(159.49 KiB) Downloaded 214 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Surface plot with pgfplots

Post by Stefan Kottwitz »

I would use a surface plot instead of a patch plot. I can see a structure, still it looks different to the matlab plot - is the matlab plot really correct? How exactly did you make it in matlab?
surface.png
surface.png (26.76 KiB) Viewed 2550 times
Stefan
LaTeX.org admin
mgulin
Posts: 18
Joined: Thu May 31, 2012 7:16 pm

Surface plot with pgfplots

Post by mgulin »

Here is the MATLAB code. The single_diode_surface.txt in MATLAB_code.zip file is the same as the one posted in the first post.

I managed to get contour plot in LaTeX by using GNU plot:
contour.png
contour.png (45.6 KiB) Viewed 2545 times
Please find attached source files.

Thanks!

-Marko
Attachments
Contour_with_GNU_plot.zip
(40.91 KiB) Downloaded 167 times
MATLAB_code.zip
(18.47 KiB) Downloaded 175 times
Post Reply