[Gmsh] x-y plots [was: x-y plots and elevation(Scalar warp) in 2D]

Geordie McBain gdmcbain at freeshell.org
Mon Jul 19 03:15:24 CEST 2010


2010/7/16 Christophe Prud'homme <prudhomm at debian.org>:
> Dear Gmsh Developers,
> It is not clear to me if it is possible to do
>  - x-y plots (1D geometry  + a scalar field )

Yes.  See tutorial/t8.geo.  The key is View.Type = 2.  There are quite
a few other things going on in t8 though, so I attach a minimal
example.  Also, my example uses the standard .msh format for the data
rather than the deprecated .pos format.

%<--x.msh
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
3
1 0 0 0
2 1 0 0
3 2 0 0
$EndNodes
$Elements
2
1 1 2 1 1 1 2
2 1 2 1 2 2 3
$EndElements
%<--end x.msh

%<--y.msh
$MeshFormat
2.2 0 8
$EndMeshFormat
$NodeData
1
"ordinate"
1
0.0
3
0
1
3
1 1.0
2 2.0
3 5.0
$EndNodeData
%<--end y.msh

%<--xy.geo
Merge "x.msh";
Merge "y.msh";

View[0].Type = 2;		// 2 for 2D space
View[0].Axes = 1;		// 1 for simple axes
%<--end xy.geo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.geo
Type: application/octet-stream
Size: 157 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100719/be96a2a4/attachment.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.msh
Type: model/mesh
Size: 131 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100719/be96a2a4/attachment.msh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: y.msh
Type: model/mesh
Size: 105 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100719/be96a2a4/attachment-0001.msh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy.geo
Type: application/octet-stream
Size: 125 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100719/be96a2a4/attachment-0001.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy.png
Type: image/png
Size: 13443 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20100719/be96a2a4/attachment.png>