Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plotting pressure in 3d Date: Thu, 23 Jan 2014 02:09:34 +0700 Organization: A noiseless patient Spider Lines: 48 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 22 Jan 2014 19:09:35 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="68a1b385f7337767ec71891ca5f646b3"; logging-data="9444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189qo+oYUVgrursl9ce2wM9" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 In-Reply-To: Cancel-Lock: sha1:DUJSKoyJnqJ2INSb1V4YMTBzvaM= Xref: csiph.com comp.graphics.apps.gnuplot:2267 22.01.2014 16:11, marco.campe@gmail.com пишет: > Hi all, > > I'm trying to do the following using gnuplot: > > I have a file that contains the 3d data (x,y,z columns) of a geometry (basically a pipe). > > In another file, I have to whole pressure distribution for each point p(x,y,z). In order to visualize the pressure in this geometry, I want to plot both the geometry and the pressure in one graph (anything like that http://journal.fluid-power.net/journal/issue6/number8.jpg for instance). > > Can somebody help me out here? > > Thank you! > Hello, I tried to plot 2d data over the surface with filledcurves, but it seems that gnuplot can't do it. So here is another solution with polygons: set term png enh size 1024,1024 set out 'pipe.png' set nokey set style fill solid 1.0 set size ratio 0.8 set pm3d at b interpolate 100,100 set view map set grid x set grid y set grid mxtics set grid mytics set object 1 polygon from 30,0 to 30,30 to 80,30 to 85,35 to 85,100 to 130,100 to 130,0 to 30,0 front set object 1 polygon fc rgb "white" fillstyle solid 1.0 border rgb "black" set object 2 polygon from 30,0 to 30,50 to 60,50 to 65,55 to 65,100 to 30,100 to 30,0 front set object 2 polygon fc rgb "white" fillstyle solid 1.0 border rgb "black" splot [30:130][0:100] 'surface.dat' with pm3d notitle Here is resulting picture: http://s006.radikal.ru/i214/1401/33/f3ab113a6d99.png It's an awkward solution, but if you will have enough points on the curved area, it would look pretty smoothly. Best regards, Michael.