Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ingo Thies Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plot lines orthogonal to contour lines Date: Mon, 10 Oct 2011 18:14:16 +0200 Lines: 26 Message-ID: <9fgjuoFcf1U1@mid.individual.net> References: <8df733b0-c46a-4854-9dc3-7381c6b96437@k34g2000yqm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 57Ii0sP8s3zGpbf12VnM/gKpvabBoYecqpFqJ6jvBm/zM8o7bY Cancel-Lock: sha1:brRhOXPwa7DNuhXyVKQUaHCNhjE= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:6.0) Gecko/20110812 Thunderbird/6.0 In-Reply-To: <8df733b0-c46a-4854-9dc3-7381c6b96437@k34g2000yqm.googlegroups.com> Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:643 Hi Thomas > is there a way to plot lines which are orthogonal to the contour > lines? > In my case, I want to plot a temperature field by isotherms and heat > flow lines. I don't know for sure whether this can be done in gnuplot directly, but what you can do ist to extract the contour lines with "set table 'somefile'", and compute the local derivatives with an external program (e.g. you could write a short C code that applies the differential quotient method). If you compute the derivs with respect to some parameter (the contour lines are parametric, aren't they?), e.g. the line number as the easiest parameter abscissa, for both x and y of the contour line, this gives you two derivatives x' and y', both combined would be the tangential vector (x',y'). Then compute the orthogonal vector (u,v) = (-y',x') (just think of a rotation matrix with a rotation vector of 90 degrees), normalize them to unit length, and then you can use them as unit vectors for your isotherms. HTH, Ingo