* some updates on gplot.py to have a better display + screenshots from gnuplot
This commit is contained in:
parent
f542d3f894
commit
8f735f0b16
3 changed files with 12 additions and 4 deletions
|
|
@ -43,7 +43,7 @@ def parser(parser=optparse.OptionParser()):
|
||||||
parser.add_option('-d', '--dimension', help='give a dimension size', default=2)
|
parser.add_option('-d', '--dimension', help='give a dimension size', default=2)
|
||||||
parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True)
|
parser.add_option('-m', '--multiplot', action="store_true", help='plot all graphics in one window', dest="multiplot", default=True)
|
||||||
parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot")
|
parser.add_option('-p', '--plot', action="store_false", help='plot graphics separetly, one by window', dest="multiplot")
|
||||||
parser.add_option('-w', '--window', help='give the number of the window you want to display, 0 means you want to display all ones', default=0)
|
parser.add_option('-w', '--windowid', help='give the window id you want to display, 0 means we display all ones', default=0)
|
||||||
|
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
|
|
||||||
|
|
@ -251,11 +251,17 @@ def main():
|
||||||
gstate = []
|
gstate = []
|
||||||
|
|
||||||
n = int(options.dimension)
|
n = int(options.dimension)
|
||||||
w = int(options.window)
|
w = int(options.windowid)
|
||||||
|
|
||||||
if options.multiplot:
|
if options.multiplot:
|
||||||
g = Gnuplot.Gnuplot()
|
g = Gnuplot.Gnuplot()
|
||||||
|
|
||||||
|
g('set parametric')
|
||||||
|
g('set nokey')
|
||||||
|
g('set noxtic')
|
||||||
|
g('set noytic')
|
||||||
|
g('set noztic')
|
||||||
|
|
||||||
g('set size 1.0, 1.0')
|
g('set size 1.0, 1.0')
|
||||||
g('set origin 0.0, 0.0')
|
g('set origin 0.0, 0.0')
|
||||||
g('set multiplot')
|
g('set multiplot')
|
||||||
|
|
@ -281,10 +287,12 @@ def main():
|
||||||
g('set size 0.5, 0.5')
|
g('set size 0.5, 0.5')
|
||||||
g('set origin 0.5, 0.0')
|
g('set origin 0.5, 0.0')
|
||||||
|
|
||||||
if n >= 3:
|
if n >= 2:
|
||||||
|
plotXYPoint('./ResPop', state=gstate, g=g)
|
||||||
|
elif n >= 3:
|
||||||
plotXYZPoint('./ResPop', state=gstate, g=g)
|
plotXYZPoint('./ResPop', state=gstate, g=g)
|
||||||
|
|
||||||
g('unset multiplot')
|
g('set nomultiplot')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
|
|
||||||
BIN
screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png
Normal file
BIN
screenshots/gplot-eda_sa-P-1000-d-10-a-0.9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
BIN
screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png
Normal file
BIN
screenshots/gplot-eda_sa-P-10000-d-2-a-0.1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Reference in a new issue