I have not been able to figure out how to plot connected markers, other
than circles. For example: plt.addPoints(range(1,14), dsum, None, Plot.CONNECTED_CIRCLES, "Total Area") adds a trace to plt. However, in another line, I have plt.addPoints(range(1,14),[x/tmp[0] for x in tmp], None, i%8 , "Track "+ str(i)) where I use i%8 to cycle through the various markers (CROSS, DOT, TRIANGLE, etc). and I would like to plot these connected, just like the connected circles, but I cannot find the option to do that. A second question is how to use the labels that are in the last argument of the addPoints command. I would like to put them in the legend, but I do not see how to recover them in order to add them to the addLegend command. Thanks in advance for any help on these issues. --aryeh -- Aryeh Weiss Faculty of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Aryeh,
Which class does the plt object that you created belong to? Thanks, Avital בתאריך 18 בספט' 2017 3:26 PM, "Aryeh Weiss" <[hidden email]> כתב: I have not been able to figure out how to plot connected markers, other than circles. For example: plt.addPoints(range(1,14), dsum, None, Plot.CONNECTED_CIRCLES, "Total Area") adds a trace to plt. However, in another line, I have plt.addPoints(range(1,14),[x/tmp[0] for x in tmp], None, i%8 , "Track "+ str(i)) where I use i%8 to cycle through the various markers (CROSS, DOT, TRIANGLE, etc). and I would like to plot these connected, just like the connected circles, but I cannot find the option to do that. A second question is how to use the labels that are in the last argument of the addPoints command. I would like to put them in the legend, but I do not see how to recover them in order to add them to the addLegend command. Thanks in advance for any help on these issues. --aryeh -- Aryeh Weiss Faculty of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Avital
Thank you for your response. On 18/09/2017 15:40, Avital Steinberg wrote: > Hi Aryeh, > Which class does the plt object that you created belong to? Belongs to Plot . I found the following: 1. I can draw a second trace with addpoints, using Plot.LINE, which gives the correct appearance, except that the legend will not include the line. 2. I can get the label into the legend if I put a null string ("") in Plot.addLegend(). So that question is answered. Best regards --aryeh > > Thanks, > Avital > > בתאריך 18 בספט' 2017 3:26 PM, "Aryeh Weiss" <[hidden email] > <mailto:[hidden email]>> כתב: > > I have not been able to figure out how to plot connected markers, > other than circles. For example: > > plt.addPoints(range(1,14), dsum, None, Plot.CONNECTED_CIRCLES, > "Total Area") > > adds a trace to plt. However, in another line, I have > > plt.addPoints(range(1,14),[x/tmp[0] for x in tmp], None, i%8 , > "Track "+ str(i)) > > where I use i%8 to cycle through the various markers (CROSS, DOT, > TRIANGLE, etc). > and I would like to plot these connected, just like the connected > circles, but I cannot find the option to do that. > > A second question is how to use the labels that are in the last > argument of the addPoints command. I would like to put them in the > legend, but I do not see how to recover them in order to add them > to the addLegend command. > > Thanks in advance for any help on these issues. > > --aryeh > > -- > Aryeh Weiss > Faculty of Engineering > Bar Ilan University > Ramat Gan 52900 Israel > > Ph: 972-3-5317638 <tel:972-3-5317638> > FAX: 972-3-7384051 <tel:972-3-7384051> > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > <http://imagej.nih.gov/ij/list.html> > > -- Aryeh Weiss Faculty of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384051 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Aryeh Weiss
Hi Aryeh,
currently, the ImageJ Plot class only has CONNECTED_CIRCLES, no CONNECTED_TRIANGLES, CONNECTED_CROSSES or so. I don't think that connected dots would make much sense (the line would hide the dots). One could think of connected boxes or diamonds [oops, I just see that we even don't have plain diamonds yet!] Beyond ImageJ, I have seen much more plots with connected circles compared to other connected symbols, so I consider this not too bad a choice. Also, the CONNECTED_CIRCLES are still not as nice as those of some other plotting programs; I think it would be nicer to have the lines end just outside the circles, not go all the way to the centers (if I have much time, maybe I'll change this). But what we have is better than nothing. If you want, e.g., connected squares, you could plot the same data set twice, once as squares (BOX), then as a line. In any case, ImageJ is not a full-fledged plotting program; if you need advanced plots you will still need Gnuplot, Grace, Veusz, etc, or the expensive solution named Origin. Michael ________________________________________________________________ On 18/09/2017 14:14, Aryeh Weiss wrote: > I have not been able to figure out how to plot connected markers, other than circles. For example: > > plt.addPoints(range(1,14), dsum, None, Plot.CONNECTED_CIRCLES, "Total Area") > > adds a trace to plt. However, in another line, I have > > plt.addPoints(range(1,14),[x/tmp[0] for x in tmp], None, i%8 , "Track "+ str(i)) > > where I use i%8 to cycle through the various markers (CROSS, DOT, TRIANGLE, etc). > and I would like to plot these connected, just like the connected circles, but I cannot find the option to do that. > > A second question is how to use the labels that are in the last argument of the addPoints command. I would like to put them in the legend, but I do not see how to recover them in order to add them to the addLegend command. > > Thanks in advance for any help on these issues. > > --aryeh > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |