Issues in gnuplot: pm3d and dgrid3d

  • Thread starter Thread starter abonatto
  • Start date Start date
  • Tags Tags
    Gnuplot Issues
Click For Summary
SUMMARY

This discussion addresses issues encountered while using gnuplot for plotting 3D data generated from a Fortran program. The user, Alexandre, initially faced problems with the pm3d and dgrid3d functions, resulting in a "sliced" surface instead of a smooth one. The solution involved modifying the x-values by dividing them by 1e+06, which successfully produced the expected continuous surface. This indicates a potential bug or limitation in the pm3d function when handling large coordinate values.

PREREQUISITES
  • Familiarity with gnuplot version 5.4 or later
  • Understanding of 3D plotting concepts
  • Basic knowledge of Fortran for data generation
  • Experience with data manipulation techniques
NEXT STEPS
  • Explore gnuplot pm3d function documentation for advanced usage
  • Investigate gnuplot dgrid3d settings and their impact on surface smoothness
  • Learn about data normalization techniques for large datasets
  • Examine potential bugs or limitations in gnuplot's handling of large coordinate values
USEFUL FOR

This discussion is beneficial for data scientists, researchers, and engineers who utilize gnuplot for 3D visualizations, particularly those working with large datasets and seeking to optimize plot quality.

abonatto
Messages
13
Reaction score
0
Dear All,

I am using gnuplot to make plots from data files generated using a fortran program. Those data files are basically big lists of 3d coordinates, just like like (not my real data, just an example):

10.0 1.00 0.01
20.0 1.00 0.14
...

So, when I use splot, I generate plot 1 (attached), and it is ok. But, after that, when I use pm3d ("set pm3d") and dgrid3d ("set dgrid3d 64,64,1", for example), it plots plot 2 (attached), which is pretty different from B]plot 1[/B]: the surface generated is "sliced", and it is not a continuous and smooth surface that it should be.

I have tried to plot with higher values in dgrid3d (256,256,3 and others...), but the problem still happens).

I really would appreciate any help on this :-)

Alexandre
 

Attachments

  • plot 1.png
    plot 1.png
    33.4 KB · Views: 919
  • plot 2.png
    plot 2.png
    15.3 KB · Views: 994
Physics news on Phys.org
Dear All,

Its me again! I have "solved" the problem, and I will post here what I did (I hope it helps someone someday :)

All I did was to divide the x-values (0 to 2.5e+06; look in plot 2 attached in the previous post) for 1e+06 (in gnuplot I changed column 1 for "($1/1000000)": please see in plot 3, attached in this post, that x-values now are between 0 and 2.5). Now I got a continuous and smooth surface, just as I was expecting to see (based on plot 1 grid of points). Would this be a bug with pm3d function in gnuplot?

Thanks to everybody who read this post!
 

Attachments

  • Plot 3.png
    Plot 3.png
    24.7 KB · Views: 1,033

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
3
Views
8K
  • · Replies 14 ·
Replies
14
Views
11K
  • · Replies 4 ·
Replies
4
Views
5K