Skip to content

Commit ae08781

Browse files
committed
Changed resolution of output plots
1 parent 8103afd commit ae08781

File tree

5 files changed

+46
-58
lines changed

5 files changed

+46
-58
lines changed

Benchmarks/MI_EvalLim_ConvergenceResults.ipynb

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": 5,
16-
"metadata": {
17-
"collapsed": false
18-
},
16+
"metadata": {},
1917
"outputs": [],
2018
"source": [
2119
"import numpy as np\n",
@@ -32,9 +30,7 @@
3230
{
3331
"cell_type": "code",
3432
"execution_count": 7,
35-
"metadata": {
36-
"collapsed": false
37-
},
33+
"metadata": {},
3834
"outputs": [],
3935
"source": [
4036
"import numpy as np\n",
@@ -51,9 +47,7 @@
5147
{
5248
"cell_type": "code",
5349
"execution_count": 9,
54-
"metadata": {
55-
"collapsed": false
56-
},
50+
"metadata": {},
5751
"outputs": [],
5852
"source": [
5953
"import numpy as np\n",
@@ -70,9 +64,7 @@
7064
{
7165
"cell_type": "code",
7266
"execution_count": 1,
73-
"metadata": {
74-
"collapsed": false
75-
},
67+
"metadata": {},
7668
"outputs": [],
7769
"source": [
7870
"import numpy as np\n",
@@ -165,9 +157,7 @@
165157
{
166158
"cell_type": "code",
167159
"execution_count": 32,
168-
"metadata": {
169-
"collapsed": false
170-
},
160+
"metadata": {},
171161
"outputs": [],
172162
"source": [
173163
"import numpy as np\n",
@@ -184,9 +174,7 @@
184174
{
185175
"cell_type": "code",
186176
"execution_count": 34,
187-
"metadata": {
188-
"collapsed": false
189-
},
177+
"metadata": {},
190178
"outputs": [],
191179
"source": [
192180
"import numpy as np\n",
@@ -248,16 +236,18 @@
248236
{
249237
"cell_type": "code",
250238
"execution_count": 2,
251-
"metadata": {
252-
"collapsed": false
253-
},
239+
"metadata": {},
254240
"outputs": [],
255241
"source": [
256242
"import sys\n",
257243
"import os\n",
258244
"sys.path.insert(0,os.path.pardir+'/src')\n",
259245
"import OptiPlot as op\n",
260246
"\n",
247+
"# Interactive Pop-up Plots\n",
248+
"import matplotlib.pyplot as plt\n",
249+
"%matplotlib qt5\n",
250+
"\n",
261251
"data=[ga, sa, pso, cs, mcs ,meigo, gnowee]\n",
262252
"label=['\\\\textbf{GA}','\\\\textbf{SA}','\\\\textbf{PSO}','\\\\textbf{CS}','\\\\textbf{MCS}',\n",
263253
" '\\\\textbf{MEIGO}','\\\\textbf{Gnowee}']\n",
@@ -294,9 +284,9 @@
294284
"name": "python",
295285
"nbconvert_exporter": "python",
296286
"pygments_lexer": "ipython2",
297-
"version": "2.7.11"
287+
"version": "2.7.13"
298288
}
299289
},
300290
"nbformat": 4,
301-
"nbformat_minor": 0
291+
"nbformat_minor": 1
302292
}

Benchmarks/MixedIntegerHyperResults.ipynb

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"cell_type": "code",
2828
"execution_count": 1,
2929
"metadata": {
30-
"collapsed": false,
3130
"scrolled": true
3231
},
3332
"outputs": [
@@ -27477,7 +27476,6 @@
2747727476
"cell_type": "code",
2747827477
"execution_count": 1,
2747927478
"metadata": {
27480-
"collapsed": false,
2748127479
"scrolled": true
2748227480
},
2748327481
"outputs": [
@@ -66691,7 +66689,6 @@
6669166689
"cell_type": "code",
6669266690
"execution_count": 1,
6669366691
"metadata": {
66694-
"collapsed": false,
6669566692
"scrolled": true
6669666693
},
6669766694
"outputs": [
@@ -94133,7 +94130,6 @@
9413394130
"cell_type": "code",
9413494131
"execution_count": 1,
9413594132
"metadata": {
94136-
"collapsed": false,
9413794133
"scrolled": true
9413894134
},
9413994135
"outputs": [
@@ -133318,7 +133314,6 @@
133318133314
"cell_type": "code",
133319133315
"execution_count": 1,
133320133316
"metadata": {
133321-
"collapsed": false,
133322133317
"scrolled": true
133323133318
},
133324133319
"outputs": [
@@ -160760,7 +160755,6 @@
160760160755
"cell_type": "code",
160761160756
"execution_count": 1,
160762160757
"metadata": {
160763-
"collapsed": false,
160764160758
"scrolled": true
160765160759
},
160766160760
"outputs": [
@@ -180374,7 +180368,6 @@
180374180368
"cell_type": "code",
180375180369
"execution_count": 1,
180376180370
"metadata": {
180377-
"collapsed": false,
180378180371
"scrolled": true
180379180372
},
180380180373
"outputs": [
@@ -199988,7 +199981,6 @@
199988199981
"cell_type": "code",
199989199982
"execution_count": 1,
199990199983
"metadata": {
199991-
"collapsed": false,
199992199984
"scrolled": true
199993199985
},
199994199986
"outputs": [
@@ -223516,7 +223508,6 @@
223516223508
"cell_type": "code",
223517223509
"execution_count": 1,
223518223510
"metadata": {
223519-
"collapsed": false,
223520223511
"scrolled": true
223521223512
},
223522223513
"outputs": [
@@ -235325,10 +235316,8 @@
235325235316
},
235326235317
{
235327235318
"cell_type": "code",
235328-
"execution_count": 2,
235329-
"metadata": {
235330-
"collapsed": false
235331-
},
235319+
"execution_count": 1,
235320+
"metadata": {},
235332235321
"outputs": [],
235333235322
"source": [
235334235323
"import os\n",
@@ -235338,6 +235327,10 @@
235338235327
"sys.path.insert(0,os.path.pardir+'/src')\n",
235339235328
"import OptiPlot as op \n",
235340235329
"\n",
235330+
"# Interactive Pop-up Plots\n",
235331+
"import matplotlib.pyplot as plt\n",
235332+
"%matplotlib qt5\n",
235333+
"\n",
235341235334
"param='Population Size'\n",
235342235335
"\n",
235343235336
"results=np.array([[[ 1.00000000e+01, 1.86727467e+02, 0.00000000e+00],\n",
@@ -235483,9 +235476,9 @@
235483235476
"name": "python",
235484235477
"nbconvert_exporter": "python",
235485235478
"pygments_lexer": "ipython2",
235486-
"version": "2.7.11"
235479+
"version": "2.7.13"
235487235480
}
235488235481
},
235489235482
"nbformat": 4,
235490-
"nbformat_minor": 0
235483+
"nbformat_minor": 1
235491235484
}

Benchmarks/TSPHyperResults.ipynb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"cell_type": "code",
2323
"execution_count": 1,
2424
"metadata": {
25-
"collapsed": false,
2625
"scrolled": true
2726
},
2827
"outputs": [
@@ -1281,7 +1280,6 @@
12811280
"cell_type": "code",
12821281
"execution_count": 1,
12831282
"metadata": {
1284-
"collapsed": false,
12851283
"scrolled": true
12861284
},
12871285
"outputs": [
@@ -2844,7 +2842,6 @@
28442842
"cell_type": "code",
28452843
"execution_count": 1,
28462844
"metadata": {
2847-
"collapsed": false,
28482845
"scrolled": true
28492846
},
28502847
"outputs": [
@@ -4407,7 +4404,6 @@
44074404
"cell_type": "code",
44084405
"execution_count": 1,
44094406
"metadata": {
4410-
"collapsed": false,
44114407
"scrolled": true
44124408
},
44134409
"outputs": [
@@ -5973,9 +5969,7 @@
59735969
{
59745970
"cell_type": "code",
59755971
"execution_count": 1,
5976-
"metadata": {
5977-
"collapsed": false
5978-
},
5972+
"metadata": {},
59795973
"outputs": [],
59805974
"source": [
59815975
"import os\n",
@@ -5985,6 +5979,10 @@
59855979
"sys.path.insert(0,os.path.pardir+'/src')\n",
59865980
"import OptiPlot as op \n",
59875981
"\n",
5982+
"# Interactive Pop-up Plots\n",
5983+
"import matplotlib.pyplot as plt\n",
5984+
"%matplotlib qt5\n",
5985+
"\n",
59885986
"param='Population Size'\n",
59895987
"\n",
59905988
"results=np.array([[[ 2.00000000e+01, 1.34906232e+05, 0.00000000e+00],\n",
@@ -6044,9 +6042,9 @@
60446042
"name": "python",
60456043
"nbconvert_exporter": "python",
60466044
"pygments_lexer": "ipython2",
6047-
"version": "2.7.11"
6045+
"version": "2.7.13"
60486046
}
60496047
},
60506048
"nbformat": 4,
6051-
"nbformat_minor": 0
6049+
"nbformat_minor": 1
60526050
}

src/OptiPlot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def plot_vars(data, lowBounds=[], upBounds=[], title=[], label=[]):
4646

4747
# Allow use of Tex sybols and set formats
4848
plt.rc('text', usetex=True)
49+
plt.rcParams['savefig.dpi'] = 900
4950
majorFormatter = FormatStrFormatter('%0.1e')
5051

5152
# Establish labels for each data set and title for the plot
@@ -126,6 +127,7 @@ def plot_hist(data, title='', xLabel=''):
126127

127128
# Allow use of Tex sybols and set formats
128129
plt.rc('text', usetex=True)
130+
plt.rcParams['savefig.dpi'] = 900
129131
majorFormatter = FormatStrFormatter('%0.1e')
130132

131133
# Establish labels for each data set and title for the plot
@@ -174,6 +176,7 @@ def plot_hist_comp(data, data2, dataLabels, title='', xLabel=''):
174176

175177
# Allow use of Tex sybols and set formats
176178
plt.rc('text', usetex=True)
179+
plt.rcParams['savefig.dpi'] = 900
177180

178181
# Establish labels for each data set and title for the plot
179182
if xLabel == '':
@@ -230,6 +233,7 @@ def plot_feval_hist(data=[], listData=[], label=[]):
230233

231234
# Allow use of Tex sybols and set formats
232235
plt.rc('text', usetex=True)
236+
plt.rcParams['savefig.dpi'] = 900
233237
majorFormatter = FormatStrFormatter('%0.1e')
234238

235239
# Label and markers
@@ -352,6 +356,7 @@ def plot_optimization(data, label, title='', xLabel=''):
352356
plt.rc('text', usetex=True)
353357
plt.rc('axes', linewidth=1.5)
354358
plt.rc('font', weight='bold')
359+
plt.rcParams['savefig.dpi'] = 900
355360
majorFormatter = FormatStrFormatter('%0.1e')
356361

357362
# Markers; currently hard wired

0 commit comments

Comments
 (0)