<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Compounds_and_multi-panel_plots_%28xfig_example%29</id>
	<title>Compounds and multi-panel plots (xfig example) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Compounds_and_multi-panel_plots_%28xfig_example%29"/>
	<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;action=history"/>
	<updated>2026-04-30T05:30:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.7</generator>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1165&amp;oldid=prev</id>
		<title>Obst: Obst moved page Example: compounds and multi-panel plots to Compounds and multi-panel plots (xfig example) without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1165&amp;oldid=prev"/>
		<updated>2018-04-17T13:23:16Z</updated>

		<summary type="html">&lt;p&gt;Obst moved page &lt;a href=&quot;/wiki/index.php?title=Example:_compounds_and_multi-panel_plots&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Example: compounds and multi-panel plots (page does not exist)&quot;&gt;Example: compounds and multi-panel plots&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php/Compounds_and_multi-panel_plots_(xfig_example)&quot; title=&quot;Compounds and multi-panel plots (xfig example)&quot;&gt;Compounds and multi-panel plots (xfig example)&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:23, 17 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1116&amp;oldid=prev</id>
		<title>Obst: Obst moved page Compounds and multi-panel plots (xfig example) to Example: compounds and multi-panel plots without leaving a redirect: revert</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1116&amp;oldid=prev"/>
		<updated>2018-04-17T09:02:37Z</updated>

		<summary type="html">&lt;p&gt;Obst moved page &lt;a href=&quot;/wiki/index.php/Compounds_and_multi-panel_plots_(xfig_example)&quot; title=&quot;Compounds and multi-panel plots (xfig example)&quot;&gt;Compounds and multi-panel plots (xfig example)&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php?title=Example:_compounds_and_multi-panel_plots&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Example: compounds and multi-panel plots (page does not exist)&quot;&gt;Example: compounds and multi-panel plots&lt;/a&gt; without leaving a redirect: revert&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:02, 17 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1115&amp;oldid=prev</id>
		<title>Obst: Obst moved page Example: compounds and multi-panel plots to Compounds and multi-panel plots (xfig example) without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1115&amp;oldid=prev"/>
		<updated>2018-04-17T09:01:29Z</updated>

		<summary type="html">&lt;p&gt;Obst moved page &lt;a href=&quot;/wiki/index.php?title=Example:_compounds_and_multi-panel_plots&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Example: compounds and multi-panel plots (page does not exist)&quot;&gt;Example: compounds and multi-panel plots&lt;/a&gt; to &lt;a href=&quot;/wiki/index.php/Compounds_and_multi-panel_plots_(xfig_example)&quot; title=&quot;Compounds and multi-panel plots (xfig example)&quot;&gt;Compounds and multi-panel plots (xfig example)&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:01, 17 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Obst</name></author>
	</entry>
	<entry>
		<id>https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1086&amp;oldid=prev</id>
		<title>Sokolova-lapa: Created page with &quot;  Category:SLxfig &lt;i&gt;an example added by Manfred&lt;/i&gt;  ===== Compounds ===== A 'compound' is a collection of several Xfig objects (of &lt;i&gt;any&lt;/i&gt; type) that are grouped toge...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.sternwarte.uni-erlangen.de/wiki/index.php?title=Compounds_and_multi-panel_plots_(xfig_example)&amp;diff=1086&amp;oldid=prev"/>
		<updated>2018-04-13T16:55:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  &lt;a href=&quot;/wiki/index.php/Category:SLxfig&quot; title=&quot;Category:SLxfig&quot;&gt;Category:SLxfig&lt;/a&gt; &amp;lt;i&amp;gt;an example added by Manfred&amp;lt;/i&amp;gt;  ===== Compounds ===== A &amp;#039;compound&amp;#039; is a collection of several Xfig objects (of &amp;lt;i&amp;gt;any&amp;lt;/i&amp;gt; type) that are grouped toge...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SLxfig]]&lt;br /&gt;
&amp;lt;i&amp;gt;an example added by Manfred&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Compounds =====&lt;br /&gt;
A 'compound' is a collection of several Xfig objects (of &amp;lt;i&amp;gt;any&amp;lt;/i&amp;gt; type) that are grouped together,&lt;br /&gt;
i.e., they can be rendered at once and be transformed &amp;amp;ndash; e.g., translated, scaled, and maybe rotated &amp;amp;ndash; together.&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;xfig_new_compound&amp;lt;/code&amp;gt; creates such a 'compound' as an SLxfig object, see&lt;br /&gt;
  help(&amp;quot;xfig_new_compound&amp;quot;);&lt;br /&gt;
Note that &amp;lt;code&amp;gt;xfig_new_compound&amp;lt;/code&amp;gt; assumes that the member objects are already aligned with respect to each other.&lt;br /&gt;
&lt;br /&gt;
In contrast, the functions &amp;lt;code&amp;gt;xfig_new_hbox_compound&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xfig_new_vbox_compound&amp;lt;/code&amp;gt;&lt;br /&gt;
translate the objects (which are given as arguments to these functions) in horizontal, respectively vertical direction&lt;br /&gt;
such that those become aligned next to, respectively on top of each other.&lt;br /&gt;
Additional spacing can be specified as an optional last argument.&lt;br /&gt;
&lt;br /&gt;
While &amp;lt;code&amp;gt;xfig_multiplot&amp;lt;/code&amp;gt; can take an array of plots like &amp;lt;code&amp;gt;xfig_multiplot([pl1,pl2,pl3])&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;xfig_new_*compound&amp;lt;/code&amp;gt; needs each plot to be an individual argument: &amp;lt;code&amp;gt;xfig_new_*compound(pl1,pl2,pl3)&amp;lt;/code&amp;gt;. The use of &amp;lt;code&amp;gt;_ _push_array&amp;lt;/code&amp;gt; (available through the isisscripts) helps to circumvent this issue:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
require(&amp;quot;isisscripts&amp;quot;);&lt;br /&gt;
...&lt;br /&gt;
variable plotlist = [pl1,pl2,pl3];&lt;br /&gt;
...&lt;br /&gt;
xfig_new_hbox_compound(__array_push(plotlist));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
===== Multi-panel plots =====&lt;br /&gt;
The function &amp;lt;code&amp;gt;xfig_multiplot&amp;lt;/code&amp;gt; combines several plot objects&lt;br /&gt;
(which are themselves compounds of many low-level objects, such as lines and images)&lt;br /&gt;
into a compound object, and additionally removes those labels and ticlabels&lt;br /&gt;
that are superfluous if more plots share the same axes.&lt;br /&gt;
However, the user must ensure him/herself that the plots which are to be combined in a multiplot,&lt;br /&gt;
have all the same respective axes!&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
  variable W=5, H=4,  % width &amp;amp; height;  all plots will use these sizes&lt;br /&gt;
           x=[-sqrt(2):sqrt(2):#101];  % and these values on the x-axis&lt;br /&gt;
  &lt;br /&gt;
  variable pl11=xfig_plot_new(W, H);&lt;br /&gt;
           pl11.plot(x,x^4);&lt;br /&gt;
  &lt;br /&gt;
  variable pl12=xfig_plot_new(W, H);&lt;br /&gt;
           pl12.plot(x, -x^2);&lt;br /&gt;
  &lt;br /&gt;
  variable pl2=xfig_plot_new(W, 2*H);  % twice as high&lt;br /&gt;
           pl2.plot(x, x^4-x^2);&lt;br /&gt;
  &lt;br /&gt;
  % combine plots pl11 and pl12 to a mulitplot&lt;br /&gt;
  variable mp1 = xfig_multiplot(pl11, pl12);&lt;br /&gt;
  &lt;br /&gt;
  % combine the multiplot mp1 and the plot pl2 horizontally next to each other&lt;br /&gt;
  variable comp = xfig_new_hbox_compound(mp1, pl2, 0.3);&lt;br /&gt;
           comp.render(&amp;quot;multiplot_and_plot.eps&amp;quot;);&lt;br /&gt;
[[File:multiplot_and_plot.png|multiplot_and_plot.png]]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;code&amp;gt;mp1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;comp&amp;lt;/code&amp;gt; are not needed for anything else, the latter three commands could also have been combined into a single one:&lt;br /&gt;
  xfig_new_hbox_compound( xfig_multiplot(pl11, pl12), &lt;br /&gt;
                          pl2, &lt;br /&gt;
                          0.3 &lt;br /&gt;
                        ).render(&amp;quot;multiplot_and_plot.eps&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Note that for the creation of the above image, I took advantage of &amp;lt;code&amp;gt;comp&amp;lt;/code&amp;gt; being a compound, and resized all objects together:&lt;br /&gt;
  comb.scale(0.75);&lt;br /&gt;
  comp.render(&amp;quot;multiplot_and_plot.png&amp;quot;);&lt;/div&gt;</summary>
		<author><name>Sokolova-lapa</name></author>
	</entry>
</feed>