When I make a category plot I colour the bars differently according to condition etc., but I would like to have the outline (stroke) of the bar AND the error bar to be black. As I see it there is no possibility to do this. The error bar stays the colour of the bar. My current workaround is to plot a second category plot on top of the original with black but empty bars. Is there a simpler way?
Bar stroke is fine - you have control from the Modify Trace Appearance dialog - but it appears that the Error Bar colour is latched to the Fill colour of the bar.
Again with Category Plots, some more flexibility is required with legend control. If you make a Category Plot with the bar colour set by a colour wave and then try to create a legend, the colour of the symbol marker (eg could be a pattern) is seemingly not controllable.
Help anyone?
Thanks
I think that the problem you're describing can be overcome by specifying the point of the wave that you want to appear in the legend. For a category plot where the colour is specified by a colour wave f(z), in the command line type:
display data vs textw (you get a contour plot)
appendtograph/NCAT data vs textw (appends some ugly curve to the plot)
change ugly curve to "sticks to zero", match fill color to contour plot color. add error bars, change color of ugly-curve data to desired error-bar color. offset ugly-curve by x=0.5.
I think RW meant "category plot" where he wrote "contour plot". I'm not positive what he means by "ugly curve", though :-)
RW wrote:
For people searching a solution to this problem:
display data vs textw (you get a contour plot)
appendtograph/NCAT data vs textw (appends some ugly curve to the plot)
change ugly curve to "sticks to zero", match fill color to contour plot color. add error bars, change color of ugly-curve data to desired error-bar color. offset ugly-curve by x=0.5.
RW's solution is good. I just tried it, and unless I'm missing something, you have to put the ugly curve (RW's terminology) behind the category plot. Otherwise a line is visible in the centre of each bar. This means that only +Y error bars are showing...?
A variation on the method that is a bit more complicated, but may give better results in terms of predictability of results.
1) Make your basic category plot.
2) Append the same data again, as a category plot.
3) Use Graph->Reorder Traces to arrange so that the pair of traces for a given data set are next to each other in the list of traces.
4) Style the first instance of each data set the way you want it.
So far, you have two bars for each category.
5) Set the mode for the second instance of each data set to dots. Set the line size (which is also dot size) to zero. Set the color to black.
6) Set the error bars on the *second* instance of each data set.
7) Set the grouping mode of the *first* instance of each trace to "Keep with next". This is the step that will make the error bars stay on top of the category bars.
Now you should have category bars with black error bars on top of the category bars. Having the error bars attached to the second instance of each data set is what puts them on top. The grouping mode of the first instance is what makes the error bars appear on top of the category bars.
Again with Category Plots, some more flexibility is required with legend control. If you make a Category Plot with the bar colour set by a colour wave and then try to create a legend, the colour of the symbol marker (eg could be a pattern) is seemingly not controllable.
Help anyone?
Thanks
January 31, 2013 at 06:24 pm - Permalink
I think that the problem you're describing can be overcome by specifying the point of the wave that you want to appear in the legend. For a category plot where the colour is specified by a colour wave f(z), in the command line type:
Hope this helps.
January 31, 2013 at 10:56 pm - Permalink
display data vs textw (you get a contour plot)
appendtograph/NCAT data vs textw (appends some ugly curve to the plot)
change ugly curve to "sticks to zero", match fill color to contour plot color. add error bars, change color of ugly-curve data to desired error-bar color. offset ugly-curve by x=0.5.
done.
June 12, 2013 at 06:53 am - Permalink
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
June 12, 2013 at 11:05 am - Permalink
June 19, 2013 at 11:47 pm - Permalink
1) Make your basic category plot.
2) Append the same data again, as a category plot.
3) Use Graph->Reorder Traces to arrange so that the pair of traces for a given data set are next to each other in the list of traces.
4) Style the first instance of each data set the way you want it.
So far, you have two bars for each category.
5) Set the mode for the second instance of each data set to dots. Set the line size (which is also dot size) to zero. Set the color to black.
6) Set the error bars on the *second* instance of each data set.
7) Set the grouping mode of the *first* instance of each trace to "Keep with next". This is the step that will make the error bars stay on top of the category bars.
Now you should have category bars with black error bars on top of the category bars. Having the error bars attached to the second instance of each data set is what puts them on top. The grouping mode of the first instance is what makes the error bars appear on top of the category bars.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 20, 2013 at 01:16 pm - Permalink