how to do category plot when I have different value number in each group?

for the category that has less value numbers, i have to type space in the cell or igor pro will say "different number of points for X and Y waves". Is that the supposed way o insert values for a category plot?

and How to generate the graph showing MEANĀ±SEM in this case? it seems that igor treats the "space" I insert as value zero.

Sincerely

Geng


here is the data example:

category1
-9.718
-21.1447
-32.7271
-44.564
-40.0014
-41.8773
-39.2567

category2
-40.333
-39.7545
-48.6443
-53.9611
-56.1018
-39.9098
-57.641
-39.6874
-36.8486
-43.1012
-57.7274
-39.0138
-40.9905
-49.3315
-42.1809
-42.0808

category3
-49.174
-46.4514
-52.7638
Your data is not suitable for a category plot as Igor uses the term. Execute this for the help:
DisplayHelpTopic "Category Plots"


In a category plot, the X wave is a text wave that defines n categories. Then you have one or more Y waves, each point of which contributes to the corresponding category. So you must have the same number of points in all waves.

If you have missing data you can represent it by NaN, also called blank.

Your data does not fit that scheme.

Perhaps you mean this:
Make/O/T categories={"Mean", "SEM"}
Make/O/N=2 stats1; WaveStats/Q category1; stats1[0] = V_avg; stats1[1] = V_sem
Make/O/N=2 stats2; WaveStats/Q category2; stats2[0] = V_avg; stats2[1] = V_sem
Make/O/N=2 stats3; WaveStats/Q category3; stats3[0] = V_avg; stats3[1] = V_sem
Display stats1,stats2,stats3 vs categories


categories is the X wave and defines two categories. stats1, stats2 and stats3 are the Y waves and contribute one point to each category.

hrodstein wrote:
Your data is not suitable for a category plot as Igor uses the term. Execute this for the help:
DisplayHelpTopic "Category Plots"


In a category plot, the X wave is a text wave that defines n categories. Then you have one or more Y waves, each point of which contributes to the corresponding category. So you must have the same number of points in all waves.

If you have missing data you can represent it by NaN, also called blank.

Your data does not fit that scheme.

Perhaps you mean this:
Make/O/T categories={"Mean", "SEM"}
Make/O/N=2 stats1; WaveStats/Q category1; stats1[0] = V_avg; stats1[1] = V_sem
Make/O/N=2 stats2; WaveStats/Q category2; stats2[0] = V_avg; stats2[1] = V_sem
Make/O/N=2 stats3; WaveStats/Q category3; stats3[0] = V_avg; stats3[1] = V_sem
Display stats1,stats2,stats3 vs categories


categories is the X wave and defines two categories. stats1, stats2 and stats3 are the Y waves and contribute one point to each category.


Thank you so much hrodstein. Following your code, I made something out which I attached.

It may take some time for me to digest this as I purely know nothing about programming.


Currengly I am eager to make plots ASAP to report my results. Can you please let me know how to plot a chat like the one I attached? Following your guide I can prepare my result first as least before I get understand the software. I want to display each data point in the chart while a bar chart shows the mean value and SEM. I tried to make a scatted dot plot with igor but I do not know how to append the bar chart to it.
Data are same as the one in my topic post.
Many thanks!
1_1.jpg (605.83 KB) 1_1.jpg (605.83 KB) 3.png (36.96 KB) 1_1.jpg (605.83 KB)
hrodstein wrote:
Your data is not suitable for a category plot as Igor uses the term. Execute this for the help:
DisplayHelpTopic "Category Plots"


In a category plot, the X wave is a text wave that defines n categories. Then you have one or more Y waves, each point of which contributes to the corresponding category. So you must have the same number of points in all waves.

If you have missing data you can represent it by NaN, also called blank.

Your data does not fit that scheme.

Perhaps you mean this:
Make/O/T categories={"Mean", "SEM"}
Make/O/N=2 stats1; WaveStats/Q category1; stats1[0] = V_avg; stats1[1] = V_sem
Make/O/N=2 stats2; WaveStats/Q category2; stats2[0] = V_avg; stats2[1] = V_sem
Make/O/N=2 stats3; WaveStats/Q category3; stats3[0] = V_avg; stats3[1] = V_sem
Display stats1,stats2,stats3 vs categories


categories is the X wave and defines two categories. stats1, stats2 and stats3 are the Y waves and contribute one point to each category.


Ah, I think I got the idea. What I should do is to calculate the mean and sem myself. And then make a category plot with these new waves. Finally I can do appending to combine scatted dot plot and the category plot. Is that right?
hrodstein wrote:
Your data is not suitable for a category plot as Igor uses the term. Execute this for the help:
DisplayHelpTopic "Category Plots"


In a category plot, the X wave is a text wave that defines n categories. Then you have one or more Y waves, each point of which contributes to the corresponding category. So you must have the same number of points in all waves.

If you have missing data you can represent it by NaN, also called blank.

Your data does not fit that scheme.

Perhaps you mean this:
Make/O/T categories={"Mean", "SEM"}
Make/O/N=2 stats1; WaveStats/Q category1; stats1[0] = V_avg; stats1[1] = V_sem
Make/O/N=2 stats2; WaveStats/Q category2; stats2[0] = V_avg; stats2[1] = V_sem
Make/O/N=2 stats3; WaveStats/Q category3; stats3[0] = V_avg; stats3[1] = V_sem
Display stats1,stats2,stats3 vs categories


categories is the X wave and defines two categories. stats1, stats2 and stats3 are the Y waves and contribute one point to each category.



Hi, here I meet another problem. I have a numeric wave named "3-5". and I am doing the command below to calculate mean and sem value
Make/N=2 mean_sem_3-5; WaveStats/Q 3-5; mean_sem_3-5[0] = V_avg; mean_sem_3-5[1] = V_sem

is that right?

igor returns warning saying "ill-formed name". Basing on my current programming knowledge I can not figure out where the problem is. Many thanks if you could give a help.
right, I figure it out.....
I need to add ' to the name, for both before and after.
I haven't followed what your asking in detail, so maybe I haven't completely understood, but...

You can make two traces in a category plot occupy the same bin on the X axis using trace grouping modes. If you have two traces on the graph and you want them in the same bin, double-click a trace to bring up the Modify Trace Appearance dialog. Select the first of the two traces in the trace list. Then, in the Grouping menu select Keep With Next.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com