Login  Register

Re: Workaround for array of arrays in a macro

Posted by Kota Miura on Jun 05, 2014; 2:36pm
URL: http://imagej.273.s1.nabble.com/Workaround-for-array-of-arrays-in-a-macro-tp5008016p5008037.html

Hi Pedro,

how about doing something like (continuing the hint I wrote)

  Plot.create("Multiple Plot", "Time", "Ratio");
  for (i=0; i < numROI; i++) {
        Plot.add("line", Array.slice(x, i * 3, (i + 1)* 3) );
  }
  Plot.show();

For plotting with different colors for each curve, see

http://cmci.embl.de/downloads/spindlefanalyzer

Cheers,
Kota





On Thu, Jun 5, 2014 at 2:30 PM, Pedro J Camello <[hidden email]> wrote:

> Hi Kota,
>
> many thanks for your help.
>
> I can easily do all the work but, when slicing the final array, the
> problem persists: how can I assign a variable for each slice without using
> an array of names? (array of arrays again...). For the Plot.create()
> Plot.add() procedure to work properly I need to have ready a set of arrays
> before Plot.creat() function and right then I can plug all the arrays in
> the multiple plot using Plot.add. And the loop does not give/stores a new
> variable with each cycle....
> I´m afraid I´ll need jus a long series of If ... to assign the slices
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--

-------------------------------------------------------------*Dr. Kota Miura*

Scientist & IT Engineer
Centre for Molecular and Cellular Imaging,
European Molecular Biology Laboratory
Meyerhofstr. 1
69117 Heidelberg
GERMANY

Tel +49 6221 387 404

Mobile +49 160 95001177

Fax +49 6221 387 512

http://cmci.embl.de
-------------------------------------------------------------

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html