Skip to content

Commit 2c8164f

Browse files
authored
Merge pull request #435 from NetLogo/wid
converted widget size for 5 models
2 parents ac25db5 + 02b1095 commit 2c8164f

5 files changed

Lines changed: 111 additions & 111 deletions

File tree

Sample Models/Chemistry & Physics/GasLab/GasLab Atmosphere.nlogox

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -348,37 +348,39 @@ end
348348
; Copyright 1997 Uri Wilensky.
349349
; See Info tab for full copyright and license.]]></code>
350350
<widgets>
351-
<view x="315" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="0" height="328" showTickCounter="true" patchSize="4.0" fontSize="10" wrappingAllowedY="false" width="328" tickCounterLabel="ticks" maxPycor="80" updateMode="1" maxPxcor="40" minPxcor="-40"></view>
352-
<button x="7" y="43" height="33" disableUntilTicks="true" forever="true" kind="Observer" display="go/stop" width="86" sizeVersion="0">go</button>
353-
<button x="7" y="10" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="86" sizeVersion="0">setup</button>
354-
<slider x="96" step="1" y="10" max="1000" display="number-of-particles" height="33" min="1" direction="Horizontal" default="100.0" variable="number-of-particles" width="206" sizeVersion="0"></slider>
355-
<monitor x="8" precision="2" y="212" height="45" fontSize="11" display="average speed" width="123" sizeVersion="0">avg-speed</monitor>
356-
<plot x="613" autoPlotX="false" yMax="10.0" autoPlotY="false" yAxis="count" y="390" xMin="0.0" height="196" legend="true" xMax="400.0" yMin="0.0" xAxis="energy" display="Energy Histogram" width="289" sizeVersion="0">
357-
<setup>set-plot-x-range 0 (0.5 * ((init-particle-speed * 3) ^ 2 ) * particle-mass)
358-
set-plot-y-range 0 ceiling (number-of-particles / 10)</setup>
351+
<view x="437" wrappingAllowedX="true" y="21" frameRate="30.0" minPycor="0" height="353" showTickCounter="true" patchSize="4.31" fontSize="10" wrappingAllowedY="false" width="353" tickCounterLabel="ticks" maxPycor="80" updateMode="1" maxPxcor="40" minPxcor="-40"></view>
352+
<plot x="840" autoPlotX="true" yMax="500.0" autoPlotY="true" yAxis="energy" y="21" xMin="0.0" height="328" legend="false" xMax="160.0" yMin="0.0" width="239" xAxis="height" display="Energy vs. Height">
353+
<setup>set-plot-x-range 0 (max-pycor * 2)</setup>
359354
<update></update>
360-
<pen interval="1.0" mode="1" display="fast" color="-1893860" legend="true">
361-
<setup>set-histogram-num-bars 45</setup>
362-
<update>histogram [ energy ] of particles with [color = red]</update>
363-
</pen>
364-
<pen interval="1.0" mode="1" display="medium" color="-11686070" legend="true">
365-
<setup>set-histogram-num-bars 45</setup>
366-
<update>histogram [ energy ] of particles with [color = green]</update>
367-
</pen>
368-
<pen interval="1.0" mode="1" display="slow" color="-14979122" legend="true">
369-
<setup>set-histogram-num-bars 45</setup>
370-
<update>histogram [ energy ] of particles with [color = blue]</update>
371-
</pen>
372-
<pen interval="1.0" mode="0" display="avg-energy" color="-7500403" legend="true">
355+
<pen interval="4.0" mode="1" display="default" color="-11686070" legend="true">
373356
<setup></setup>
374-
<update>plot-pen-reset draw-vert-line avg-energy</update>
357+
<update>plot-pen-reset draw-graph</update>
375358
</pen>
376-
<pen interval="1.0" mode="0" display="init-avg-energy" color="-16777216" legend="true">
377-
<setup>draw-vert-line avg-energy-init</setup>
378-
<update></update>
359+
</plot>
360+
<plot x="840" autoPlotX="true" yMax="160.0" autoPlotY="true" yAxis="count" y="210" xMin="0.0" height="165" legend="false" xMax="160.0" yMin="0.0" width="239" xAxis="height" display="Density Histogram">
361+
<setup>set-plot-x-range 0 (max-pycor * 2)
362+
set-plot-y-range 0 (max-pxcor * 2)
363+
set-histogram-num-bars round (max-pxcor / 2)</setup>
364+
<update></update>
365+
<pen interval="1.0" mode="1" display="default" color="-11686070" legend="true">
366+
<setup></setup>
367+
<update>histogram [ycor + max-pycor] of particles</update>
379368
</pen>
380369
</plot>
381-
<plot x="10" autoPlotX="true" yMax="100.0" autoPlotY="true" yAxis="count (%)" y="390" xMin="0.0" height="196" legend="true" xMax="20.0" yMin="0.0" xAxis="time" display="Speed Counts" width="295" sizeVersion="0">
370+
<switch x="103" y="67" height="37" on="true" variable="collide?" width="103" display="collide?"></switch>
371+
<monitor x="273" precision="1" y="312" height="60" fontSize="11" width="123" display="percent lost particles">percent-lost-particles</monitor>
372+
<slider x="103" step="1" y="7" max="1000" width="250" display="number-of-particles" height="50" min="1" direction="Horizontal" default="100.0" variable="number-of-particles"></slider>
373+
<slider x="103" step="1" y="117" max="20" width="250" display="init-particle-speed" height="50" min="1" direction="Horizontal" default="10.0" variable="init-particle-speed"></slider>
374+
<slider x="103" step="1" y="182" max="20" width="250" display="particle-mass" height="50" min="1" direction="Horizontal" default="1.0" variable="particle-mass"></slider>
375+
<slider x="103" step="0.2" y="247" max="15" width="250" display="gravity-acceleration" height="50" min="0" direction="Horizontal" default="9.8" variable="gravity-acceleration"></slider>
376+
<button x="5" y="117" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="78" display="clear trace">clear-drawing</button>
377+
<switch x="250" y="67" height="37" on="true" variable="trace?" width="103" display="trace?"></switch>
378+
<monitor x="8" precision="2" y="312" height="60" fontSize="11" width="123" display="average speed">avg-speed</monitor>
379+
<monitor x="144" precision="1" y="312" height="60" fontSize="11" width="118" display="average energy">avg-energy</monitor>
380+
<monitor x="10" precision="0" y="387" height="60" fontSize="11" width="121" display="percent fast">percent-fast</monitor>
381+
<monitor x="144" precision="0" y="387" height="60" fontSize="11" width="118" display="percent medium">percent-medium</monitor>
382+
<monitor x="273" precision="0" y="387" height="60" fontSize="11" width="123" display="percent slow">percent-slow</monitor>
383+
<plot x="10" autoPlotX="true" yMax="100.0" autoPlotY="true" yAxis="count (%)" y="490" xMin="0.0" height="196" legend="true" xMax="20.0" yMin="0.0" width="295" xAxis="time" display="Speed Counts">
382384
<setup>set-plot-y-range 0 100</setup>
383385
<update></update>
384386
<pen interval="1.0" mode="0" display="fast" color="-1893860" legend="true">
@@ -394,8 +396,7 @@ set-plot-y-range 0 ceiling (number-of-particles / 10)</setup>
394396
<update>plotxy ticks percent-slow</update>
395397
</pen>
396398
</plot>
397-
<switch x="96" y="44" height="33" on="true" variable="collide?" display="collide?" width="103" sizeVersion="0"></switch>
398-
<plot x="311" autoPlotX="false" yMax="40.0" autoPlotY="false" yAxis="count" y="390" xMin="0.0" height="196" legend="true" xMax="20.0" yMin="0.0" xAxis="speed" display="Speed Histogram" width="294" sizeVersion="0">
399+
<plot x="402" autoPlotX="false" yMax="40.0" autoPlotY="false" yAxis="count" y="490" xMin="0.0" height="196" legend="true" xMax="20.0" yMin="0.0" width="294" xAxis="speed" display="Speed Histogram">
399400
<setup>set-plot-x-range 0 (init-particle-speed * 3)
400401
set-plot-y-range 0 ceiling (number-of-particles / 10)</setup>
401402
<update></update>
@@ -420,34 +421,33 @@ set-plot-y-range 0 ceiling (number-of-particles / 10)</setup>
420421
<update></update>
421422
</pen>
422423
</plot>
423-
<slider x="7" step="0.2" y="156" max="15" display="gravity-acceleration" height="33" min="0" direction="Horizontal" default="9.8" variable="gravity-acceleration" width="186" sizeVersion="0"></slider>
424-
<slider x="7" step="1" y="82" max="20" display="init-particle-speed" height="33" min="1" direction="Horizontal" default="10.0" variable="init-particle-speed" width="186" sizeVersion="0"></slider>
425-
<slider x="7" step="1" y="119" max="20" display="particle-mass" height="33" min="1" direction="Horizontal" default="1.0" variable="particle-mass" width="186" sizeVersion="0"></slider>
426-
<switch x="199" y="44" height="33" on="true" variable="trace?" display="trace?" width="103" sizeVersion="0"></switch>
427-
<plot x="659" autoPlotX="true" yMax="160.0" autoPlotY="true" yAxis="count" y="199" xMin="0.0" height="165" legend="false" xMax="160.0" yMin="0.0" xAxis="height" display="Density Histogram" width="239" sizeVersion="0">
428-
<setup>set-plot-x-range 0 (max-pycor * 2)
429-
set-plot-y-range 0 (max-pxcor * 2)
430-
set-histogram-num-bars round (max-pxcor / 2)</setup>
424+
<plot x="793" autoPlotX="false" yMax="10.0" autoPlotY="false" yAxis="count" y="490" xMin="0.0" height="196" legend="true" xMax="400.0" yMin="0.0" width="289" xAxis="energy" display="Energy Histogram">
425+
<setup>set-plot-x-range 0 (0.5 * ((init-particle-speed * 3) ^ 2 ) * particle-mass)
426+
set-plot-y-range 0 ceiling (number-of-particles / 10)</setup>
431427
<update></update>
432-
<pen interval="1.0" mode="1" display="default" color="-11686070" legend="true">
433-
<setup></setup>
434-
<update>histogram [ycor + max-pycor] of particles</update>
428+
<pen interval="1.0" mode="1" display="fast" color="-1893860" legend="true">
429+
<setup>set-histogram-num-bars 45</setup>
430+
<update>histogram [ energy ] of particles with [color = red]</update>
435431
</pen>
436-
</plot>
437-
<plot x="659" autoPlotX="true" yMax="500.0" autoPlotY="true" yAxis="energy" y="10" xMin="0.0" height="181" legend="false" xMax="160.0" yMin="0.0" xAxis="height" display="Energy vs. Height" width="239" sizeVersion="0">
438-
<setup>set-plot-x-range 0 (max-pycor * 2)</setup>
439-
<update></update>
440-
<pen interval="4.0" mode="1" display="default" color="-11686070" legend="true">
432+
<pen interval="1.0" mode="1" display="medium" color="-11686070" legend="true">
433+
<setup>set-histogram-num-bars 45</setup>
434+
<update>histogram [ energy ] of particles with [color = green]</update>
435+
</pen>
436+
<pen interval="1.0" mode="1" display="slow" color="-14979122" legend="true">
437+
<setup>set-histogram-num-bars 45</setup>
438+
<update>histogram [ energy ] of particles with [color = blue]</update>
439+
</pen>
440+
<pen interval="1.0" mode="0" display="avg-energy" color="-7500403" legend="true">
441441
<setup></setup>
442-
<update>plot-pen-reset draw-graph</update>
442+
<update>plot-pen-reset draw-vert-line avg-energy</update>
443+
</pen>
444+
<pen interval="1.0" mode="0" display="init-avg-energy" color="-16777216" legend="true">
445+
<setup>draw-vert-line avg-energy-init</setup>
446+
<update></update>
443447
</pen>
444448
</plot>
445-
<monitor x="10" precision="0" y="335" height="45" fontSize="11" display="percent fast" width="88" sizeVersion="0">percent-fast</monitor>
446-
<monitor x="103" precision="0" y="336" height="45" fontSize="11" display="percent medium" width="104" sizeVersion="0">percent-medium</monitor>
447-
<monitor x="212" precision="0" y="336" height="45" fontSize="11" display="percent slow" width="92" sizeVersion="0">percent-slow</monitor>
448-
<monitor x="9" precision="1" y="274" height="45" fontSize="11" display="percent lost particles" width="123" sizeVersion="0">percent-lost-particles</monitor>
449-
<monitor x="143" precision="1" y="212" height="45" fontSize="11" display="average energy" width="118" sizeVersion="0">avg-energy</monitor>
450-
<button x="199" y="77" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="clear trace" width="103" sizeVersion="0">clear-drawing</button>
449+
<button x="5" y="22" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="86">setup</button>
450+
<button x="5" y="67" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="86" display="go/stop">go</button>
451451
</widgets>
452452
<info><![CDATA[## WHAT IS IT?
453453

Sample Models/Computer Science/Cellular Automata/CA 1D Elementary.nlogox

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -222,26 +222,26 @@ end
222222
; Copyright 1998 Uri Wilensky.
223223
; See Info tab for full copyright and license.]]></code>
224224
<widgets>
225-
<view x="229" wrappingAllowedX="true" y="12" frameRate="30.0" minPycor="-64" height="262" showTickCounter="true" patchSize="2.0" fontSize="10" wrappingAllowedY="false" width="518" tickCounterLabel="ticks" maxPycor="64" updateMode="1" maxPxcor="128" minPxcor="-128"></view>
226-
<button x="7" y="10" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="setup single" width="108" sizeVersion="0">single-cell</button>
227-
<button x="7" y="45" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="setup random" width="118" sizeVersion="0">setup-random</button>
228-
<switch x="110" y="300" height="33" on="true" variable="OOO" display="OOO" width="98" sizeVersion="0"></switch>
229-
<switch x="10" y="300" height="33" on="false" variable="OOI" display="OOI" width="100" sizeVersion="0"></switch>
230-
<switch x="110" y="267" height="33" on="false" variable="OIO" display="OIO" width="98" sizeVersion="0"></switch>
231-
<switch x="10" y="267" height="33" on="true" variable="OII" display="OII" width="100" sizeVersion="0"></switch>
232-
<switch x="110" y="234" height="33" on="false" variable="IOO" display="IOO" width="98" sizeVersion="0"></switch>
233-
<switch x="10" y="234" height="33" on="true" variable="IOI" display="IOI" width="100" sizeVersion="0"></switch>
234-
<switch x="110" y="201" height="33" on="true" variable="IIO" display="IIO" width="98" sizeVersion="0"></switch>
235-
<switch x="10" y="201" height="33" on="false" variable="III" display="III" width="100" sizeVersion="0"></switch>
236-
<note x="11" y="143" height="18" textColorLight="-16777216" fontSize="11" width="90" markdown="false">Rule Switches:</note>
237-
<note x="13" y="387" height="18" textColorLight="-16777216" fontSize="11" width="90" markdown="false">Colors:</note>
238-
<slider x="10" step="1.0" y="164" max="255.0" display="rule" height="33" min="0.0" direction="Horizontal" default="105.0" variable="rule" width="198" sizeVersion="0"></slider>
239-
<slider x="115" step="1.0" y="45" max="100.0" display="density" height="33" min="0.0" direction="Horizontal" default="10.0" variable="density" units="%" width="106" sizeVersion="0"></slider>
240-
<button x="8" y="92" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="71" sizeVersion="0">go</button>
241-
<button x="12" y="342" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="show rules" width="99" sizeVersion="0">show-rules</button>
242-
<switch x="82" y="92" height="33" on="false" variable="auto-continue?" display="auto-continue?" width="140" sizeVersion="0"></switch>
243-
<input x="14" multiline="false" y="406" height="60" variable="foreground" type="color" width="120" sizeVersion="0">55.0</input>
244-
<input x="139" multiline="false" y="406" height="60" variable="background" type="color" width="116" sizeVersion="0">0.0</input>
225+
<view x="384" wrappingAllowedX="true" y="26" frameRate="30.0" minPycor="-64" height="363" showTickCounter="true" patchSize="2.786" fontSize="10" wrappingAllowedY="false" width="720" tickCounterLabel="ticks" maxPycor="64" updateMode="1" maxPxcor="128" minPxcor="-128"></view>
226+
<button x="7" y="10" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="118" display="setup single">single-cell</button>
227+
<button x="7" y="47" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="118" display="setup random">setup-random</button>
228+
<switch x="10" y="350" height="37" on="false" variable="OOI" width="100" display="OOI"></switch>
229+
<switch x="10" y="313" height="37" on="true" variable="OII" width="100" display="OII"></switch>
230+
<switch x="10" y="276" height="37" on="true" variable="IOI" width="100" display="IOI"></switch>
231+
<switch x="10" y="239" height="37" on="false" variable="III" width="100" display="III"></switch>
232+
<note x="11" y="164" backgroundDark="0" fontSize="11" width="90" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Rule Switches:</note>
233+
<note x="13" y="443" backgroundDark="0" fontSize="11" width="90" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Colors:</note>
234+
<button x="8" y="96" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="71">go</button>
235+
<button x="12" y="396" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="99" display="show rules">show-rules</button>
236+
<switch x="82" y="96" height="37" on="false" variable="auto-continue?" width="140" display="auto-continue?"></switch>
237+
<input x="14" multiline="false" y="462" height="60" variable="foreground" type="color" width="250">55.0</input>
238+
<input x="269" multiline="false" y="462" height="60" variable="background" type="color" width="250">0.0</input>
239+
<switch x="114" y="239" height="37" on="true" variable="IIO" width="98" display="IIO"></switch>
240+
<switch x="114" y="276" height="37" on="false" variable="IOO" width="98" display="IOO"></switch>
241+
<switch x="114" y="313" height="37" on="false" variable="OIO" width="98" display="OIO"></switch>
242+
<switch x="114" y="350" height="37" on="true" variable="OOO" width="98" display="OOO"></switch>
243+
<slider x="9" step="1.0" y="185" max="255.0" width="202" display="rule" height="50" min="0.0" direction="Horizontal" default="78.0" variable="rule"></slider>
244+
<slider x="143" step="1.0" y="32" max="100.0" width="225" display="density" height="50" min="0.0" direction="Horizontal" default="10.0" variable="density" units="%"></slider>
245245
</widgets>
246246
<info><![CDATA[## WHAT IS IT?
247247

0 commit comments

Comments
 (0)