Path: csiph.com!1.us.feeder.erje.net!3.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!gandalf.srv.welterde.de!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=C3=B6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Plotting multiple datsets Date: Thu, 26 Oct 2023 11:10:28 +0200 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 26 Oct 2023 09:10:29 -0000 (UTC) Injection-Info: dont-email.me; posting-host="4b3c27c00d17975d3a86ac4d40e35f8f"; logging-data="1573998"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PnzUjhPrZvT7kbxW509Yn1+ZefO3lu5Q=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:jUaCmeDIsS5fYxPbPY4qOr10cgA= Content-Language: de-DE, en-GB In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:4544 On 26.10.2023 10:17, christina aruvickal wrote: > Hi everyone, > > I would like to plot two datasets in one plot. The datasets are > basically energy files obtained from cp2k. > > # I have 0-2300 MD steps in FILE1 and 2000-10000 MD steps in FILE2. # > I would like to plot 0-2300 MD steps from FILE1 and 2301-10000 MD > steps from FILE2. > > I have tried a few things: eg: plot [1:2000] 'filename' u 1:6, > [2001:] 'filename' u 1:6 (where 1 and 6 are the MD step number and > conserved quantity respectively) plot 'File1' u 1:6, 'File2' u ($1 > 2300 ? $1:1/0):6 This plot all data from "File1" and all data from "File2" where col 1 is greater than 2300. Jörg