From owner-freebsd-questions@freebsd.org Thu Jan 2 15:28:34 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46F8E1D217F for ; Thu, 2 Jan 2020 15:28:34 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47pX4K1CSkz4X9y for ; Thu, 2 Jan 2020 15:28:32 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: by mail-lj1-x233.google.com with SMTP id a13so41054684ljm.10 for ; Thu, 02 Jan 2020 07:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7UEJexEvLmJ5RqWt8RMtkMBgX6DJ+2kf/lAGlWyJi9g=; b=QYddz7pYU6CMuzbKs6idaeCe2b8TS0LQ+YuLSp5QFkJkkukVLHdb0rCGL7axK+6hXO zt11cLSPQ0fbOEcGgPv1xL2MsUXLbtMNmc7ozr9HSVUZAiB08K7GUUuc2MvnoQNpxWTT RR/DGlvTOHq/DHeVey0J5clRQLzGZYuvXuu/Q912Unqw7EOxXQYOzrFa7K0Tc/T5wVuv uU5Uodw4SFR90S0MwQ5sgYQC5v0lr25HJSkkfKDSwi2SA72JOJb+ASkoQDAHDbwu0Y+x 0TpUEPm9g9px6q6bJIOvttn6T/PQBUnGV+t53YwQGTnm9GKqnGdzyPGFqoZ0ZCD9wbzL 9tBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7UEJexEvLmJ5RqWt8RMtkMBgX6DJ+2kf/lAGlWyJi9g=; b=j6T2JH6YnVTx8wI9WFtmrV904xWghCFrx361OSHNx5SnjLzcbnPAxZDA4QgBOIh2qe M+3nxUcGrOQwjFIXmZ5+H1rQWXV0Loj7UlKOhLO8zQBbRT1F+zsyqRJbK9L+k26fVB3b EODWxdAbnZoOug8rID0oDFn6hp8s/oB54HkmnB2csZkEYmiWJiWeeRD+ckACapxT62vs 2+sYaCjsiGUnrLdK18BjoOFU/rGcVqmDdpySdOUSvr97iyd6Yur7ffWQFPTweqVtnFEW 6scwvET/GeMlRoM9O62ZmWJH8tYJA5IHrnFcZHeNrsemDJKSqUrSh3il8QiSDie4IZ4/ eOVw== X-Gm-Message-State: APjAAAXClODE9LrtVRgW3tqdE1H5ddYBjQ+lLYFtfB4FEKgaOcGlvQbe rkFiPrN7qHfC5a55GDJmCGkIv9mSDjB4sY2YyZ8nfkNp X-Google-Smtp-Source: APXvYqygzj+eD/AShWQjJbIFRMW93k6OUA87U53CpkoCp64mr+O0Kas/PXqxNv+I9lJ5nbQy7kku+0n9DlPEq+t4P9c= X-Received: by 2002:a2e:9e16:: with SMTP id e22mr30650032ljk.220.1577978910707; Thu, 02 Jan 2020 07:28:30 -0800 (PST) MIME-Version: 1.0 References: <9e461c4b-bd0e-8c3e-5b78-77d59afcc6a5@irk.ru> <20200102152914.e98bb8ee.freebsd@edvax.de> In-Reply-To: <20200102152914.e98bb8ee.freebsd@edvax.de> From: Mehmet Erol Sanliturk Date: Thu, 2 Jan 2020 18:27:53 +0300 Message-ID: Subject: Re: Src of any simple data plotting graphic program under X-Windows needed To: Polytropon Cc: thor , FreeBSD Questions Mailing List X-Rspamd-Queue-Id: 47pX4K1CSkz4X9y X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=QYddz7pY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mesanliturk@gmail.com designates 2a00:1450:4864:20::233 as permitted sender) smtp.mailfrom=mesanliturk@gmail.com X-Spamd-Result: default: False [4.50 / 15.00]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(0.00)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.12), ipnet: 2a00:1450::/32(-2.63), asn: 15169(-1.87), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(0.00)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[3.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; URIBL_SBL(6.50)[gnuplot.info]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2020 15:28:34 -0000 On Thu, Jan 2, 2020 at 5:29 PM Polytropon wrote: > On Thu, 2 Jan 2020 22:00:49 +0800, thor wrote: > > I need some specialized program that should just read a data file and > > plot it in X-windows. No dependencies, no toolkits - just an absolutely > > bare minimum. I just have neither a disk space on target system for any > > specialized toolkits nor time to study them. > > I'd suggest GNUplot. It can process "linear" data as well > as CSV files, and write to the X display or to an image > file (or EPS). > > > > > Long time ago (some 20 years or so) in FreeBSD 3 times I used a > > primitive program named xperfmon3 that plotted the current processor use > > etc but it expired due to absence of a maintainer and I cannot find it. > > Yes, I remember that program. > > In case you want to plot system usage data, check out > xload, xmbmon, xcpufreq. > > > > > Are there in port tree any similar simple programs that could be used as > > a prototype? > > If your data is simple, and your displaying requirements > are simple, you can probably write your own solution using > toools like Perl or Python, where there are plenty of > libraries and examples for data plotting. In case you don't > want to deal with that, consider testing gnuplot, even though > it's not exactly "lightweight" in terms of dependencies... > > For example, if this is your data: > > 1 12.5 > 2 13.5 > 3 14.8 > 4 14.2 > 5 13.2 > 6 14.0 > 7 14.9 > 8 13.6 > 9 14.9 > 10 15.8 > 11 13.3 > 12 13.7 > > You can use the following gnuplot control file to plot them: > > set title '2008 (12.9)' > set size 3.0, 1.0 > set xr [1:12] > set yr [0.0:25.0] > set border > set grid > set xtics 1, 1 > set ytics 0, 5 > plot '2008.dat' using 1:2 title 'BZ' with lines linewidth 5 > set term postscript eps color > set output '2008.eps' > replot > > Further postprocessing is possible (in this specific case, I > used awk, LaTeX, and a sh wrapper for automated document > generation and data export files). > > Basically, you can use gnuplot without a control file - in most > cases, the data files will be plotted as you expect, or you can > embed the data in the control files (only useful for smaller > amounts of data and "single use" situations, or for experimenting > with the parameters). For similarly structured data, you can use > one control file to process many input data files. > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > > gnuplot is NOT related to GNU . In its web site http://www.gnuplot.info/ http://gnuplot.sourceforge.net/ http://gnuplot.sourceforge.net/demo/ there are much material to be utilized for learning . It is a port : https://www.freshports.org/math/gnuplot/ There is another a nice program in Python : https://matplotlib.org/ It is a port : https://www.freshports.org/math/py-matplotlib/