Plot.setJustification() problems....

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Plot.setJustification() problems....

Rotella, Anthony M. (GRC)[]
Hello all,

        I have been working on plotting some data within my ImageJ
macro, and I am having some problems. My code is:

Plot.create("Total and Void Area vs. Slice Number", "Slice", "Void
Area", aVoids);
Plot.setColor("green");
Plot.setLimits(1, aVoids.length, 0, 25000);
Plot.add("line", aTot);
Plot.setColor("orange");
Plot.setJustification("right");
Plot.addText("Total Area: Orange  Void Area: Green", 0, 0);
Plot.show();

One problem I am having is that the colors that my key says, are
actually opposite of what it says. This may just be some problem with
the order or my statements or something like this. The other problem I
am having is that when I add in Plot.setJustification("center"), it
actually moves my text left! It cuts it of to read something like, "otal
Area: ....." and if I type Plot.setJustification("right"), it cuts off
more! It reads "rea: Green". I am sure I am making some silly mistake.
Does it center it about (0, 0)? Is there an elegant way to get the text
somewhere into the body of the graph, or do I just have to do something
like "                              \n\n\n Blah..." to get it there?
Thanks a lot!

Tony Rotella
Reply | Threaded
Open this post in threaded view
|

Re: Plot.setJustification() problems....

Justin McGrath
I think the "Simple Plot" macro here
http://rsb.info.nih.gov/ij/macros/ExamplePlots.txt will explain.
Center, left and right justified changes where the text is placed in
relation to the x coordinate in the addText function.  If you want the
text in the figure area, change the Y coordindate in the addText
function.

Justin

On 8/16/07, Rotella, Anthony M. (GRC)[] <[hidden email]> wrote:

> Hello all,
>
>         I have been working on plotting some data within my ImageJ
> macro, and I am having some problems. My code is:
>
> Plot.create("Total and Void Area vs. Slice Number", "Slice", "Void
> Area", aVoids);
> Plot.setColor("green");
> Plot.setLimits(1, aVoids.length, 0, 25000);
> Plot.add("line", aTot);
> Plot.setColor("orange");
> Plot.setJustification("right");
> Plot.addText("Total Area: Orange  Void Area: Green", 0, 0);
> Plot.show();
>
> One problem I am having is that the colors that my key says, are
> actually opposite of what it says. This may just be some problem with
> the order or my statements or something like this. The other problem I
> am having is that when I add in Plot.setJustification("center"), it
> actually moves my text left! It cuts it of to read something like, "otal
> Area: ....." and if I type Plot.setJustification("right"), it cuts off
> more! It reads "rea: Green". I am sure I am making some silly mistake.
> Does it center it about (0, 0)? Is there an elegant way to get the text
> somewhere into the body of the graph, or do I just have to do something
> like "                              \n\n\n Blah..." to get it there?
> Thanks a lot!
>
> Tony Rotella
>
Reply | Threaded
Open this post in threaded view
|

median and mean filter switched with background subtract in ij 1.38x running on linux

Jarek Grodek
In reply to this post by Rotella, Anthony M. (GRC)[]
Hi all,

I just discovered that in 1.38 x (yesterday downloaded from IJ page)
running under Linux median filter and mean filter called from GUI cause
rolling Ball setting window appearance instead of windows of mentioned
filters.

greetings,
Jarek
Reply | Threaded
Open this post in threaded view
|

Re: median and mean filter switched with background subtract in ij 1.38x running on linux

Gabriel Landini
On Friday 17 August 2007, Jarosław Grodek wrote:

> I just discovered that in 1.38 x


Too old. To update read this:
http://imagejdocu.tudor.lu/imagej-documentation-wiki/faq/how-do-i-update-imagej

G.