<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Running plot]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=1009&amp;type=atom" />
	<updated>2026-03-12T17:20:52Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=1009</id>
		<entry>
			<title type="html"><![CDATA[Re: Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4569#p4569" />
			<content type="html"><![CDATA[<p>You can use <a href="https://simplyfortran.com/docs/aplot/intro.html">Aplot</a> that comes with Simply Fortran, but it does require user interaction (your program will pause while the plot is shown).&nbsp; The plots in Aplot cannot be updated, though; you would need to close them and create an entirely new plot.</p><p>The alternative would be a third-party library like <a href="https://plplot.sourceforge.net/">PLplot</a>, which does provide a Fortran interface.&nbsp; You&#039;ll need to build that as well on macOS first, though, or use a package manager like <a href="https://formulae.brew.sh/formula/plplot">Homebrew</a> or <a href="https://ports.macports.org/search/?q=plplot&amp;name=on">MacPorts</a> to install it as a binary.&nbsp; </p><p>There is a <a href="https://github.com/jchristopherson/fplot">library called fplot</a> that allows for interacting with GNUPlot from within Fortran.&nbsp; I&#039;ve never personally used it, but it looks promising.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2026-03-12T17:20:52Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4569#p4569</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4568#p4568" />
			<content type="html"><![CDATA[<p>I will keep gnuplot in mind. It may solve other issues with my plotting as well. But I am also interested in doing very simple plotting directly by the fortran code, in real time. How do I do that?</p>]]></content>
			<author>
				<name><![CDATA[Hibbs]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4557</uri>
			</author>
			<updated>2026-03-12T16:58:44Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4568#p4568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4565#p4565" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Hibbs wrote:</cite><blockquote><p>How do I do that in Simply Fortran for the Mac? I only need 5 routines: Open a plotting window, change the pen color, move the pen, draw a line, and close the window.</p></blockquote></div><p>Simply Fortran ships with a plotting package, but it does not support running graphs or closing/replacing existing ones on macOS, so that won&#039;t work.&nbsp; You would need a third-party plotting library.</p><div class="quotebox"><cite>Hibbs wrote:</cite><blockquote><p>I do not think that will work for me. Even if the data file is linked to gnuplot, the data does not appear in the data file when fortran executes a write statement, it is held in a buffer, sometimes until the program terminates.</p></blockquote></div><p>Indeed the output is buffered.&nbsp; You can, however, use the GNU extension <a href="https://simplyfortran.com/docs/compiler/FLUSH.html#FLUSH">FLUSH</a> to force a unit to flush to disk or screen (depending on the unit).&nbsp; Writing to a data file that GNUPlot reads might be preferable to trying to directly integrate or call a library just due to the simplicity.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2026-03-11T21:01:42Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4565#p4565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4564#p4564" />
			<content type="html"><![CDATA[<p>I do not think that will work for me. Even if the data file is linked to gnuplot, the data does not appear in the data file when fortran executes a write statement, it is held in a buffer, sometimes until the program terminates. I want the plot to appear step by step, as the fortran program runs. A good analogy would be: Think of writing a game in fortran with simple vector graphics. You want the graphics to appear instantly, not after it has been buffered, written to a file, then read by another code.</p>]]></content>
			<author>
				<name><![CDATA[Hibbs]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4557</uri>
			</author>
			<updated>2026-03-11T17:58:45Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4564#p4564</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4563#p4563" />
			<content type="html"><![CDATA[<p>This works well for me.&nbsp; http://gnuplot.info/ You just have to write the plot data to a file in the format gnuplot likes which is really simple.&nbsp; I mostly write motion control programs using FORTRAN for CNC machines, so I use WPCVIEW for sanity checks.</p>]]></content>
			<author>
				<name><![CDATA[TRUEPRECISIONCNC]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4528</uri>
			</author>
			<updated>2026-03-11T14:29:07Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4563#p4563</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Running plot]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=4562#p4562" />
			<content type="html"><![CDATA[<p>I am on a Macintosh. When my program runs it would be very nice to have feedback on how it is doing, or if it has gotten hung up. In the past I have gotten both by having the program make a running plot, that it plotting some basic results on the screen as the program runs. How do I do that in Simply Fortran for the Mac? I only need 5 routines: Open a plotting window, change the pen color, move the pen, draw a line, and close the window.</p>]]></content>
			<author>
				<name><![CDATA[Hibbs]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=4557</uri>
			</author>
			<updated>2026-03-09T19:05:03Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=4562#p4562</id>
		</entry>
</feed>
