How to view in-built GA plotting functions side by side?

1 Ansicht (letzte 30 Tage)
Callum
Callum am 12 Feb. 2015
Kommentiert: Callum am 13 Feb. 2015
Hi fellow Matlab-ers!
I am using the command line GA from the Global Optimization Toolbox. I am using two plotting functions, @gaplotrange, and @gaplotbestindiv. This plots one on top, and one on the bottom (like subplot(2,1,)), and I would like to set it to be side by side (like subplot(1,2,)).
I have created my own plotting functions by slightly adjusting their code, and I tried to include a subplot inside them, which resulted in only the second called plot function being displayed, though it was displayed correctly (subplot(1,2,2)).
I have also delved into the file 'gadsplot.m' which appeared to be the one responsible for setting up these plots. I tried changing the ordering of the subplots, to no avail. My last ditch attempt was to hard code the subplots as desired, but this hasn't worked either.
So, I was wondering if there is a simple way to do this, or if not, does anyone know which file and what I would have to change to get this to work?
Thanks in advance, Callum.
  2 Kommentare
Rakesh Kumar
Rakesh Kumar am 12 Feb. 2015
You can change the code in gadsplot.m where rows and cols are calculated.
How about a layout (1,2) instead of (2,1)? I can interchange rows and cols in that function.
Callum
Callum am 13 Feb. 2015
Thanks, I didn't think about changing that specifically, and it worked! Though I can't seem to accept your answer. Maybe because its a comment and not an answer, though I'm not too sure. In any case I changed lines 114-115 in gadsplot.m to:
%
cols = ceil(sqrt(length(functions)));
rows = ceil(length(functions)/cols);
Cheers, Rakesh!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by