
Category Plot starting not from zero

ChrisZ
Is there any option to make a category/bar plot, where the bars do not start from zero? In my case I need them to start from 1 and extending in both directions to values ranging from 0.1 to 10.
Additionally I want to have it with a logarithmic scale, which I suppose wouldn't cause any further problems as soon as the first problem is solved.
Attached you see an example done with Excel (which is why I think there is no possibilty Igor can handle this, but I just couldn't find a possibilty)
Thank you for your help and best regards,
Chris

Reproducing the axis crossing at 1 instead of being at the edge, and having the bars stick out from the axis in both directions, requires some trickery. Let me know if you're interested in my trickery.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 3, 2015 at 10:13 am - Permalink
Thanks for your reply. I had already managed to swap the axes, but then failed in shifting the axis and changing the origin of the bars.
So, yes, I'm very interested in your trickery ;-)
What you suggested so far gives the plot attached. Looks good, but i really need the origin at 1.
What will be plotted is a ratio of two values, which results in two groups, i.e. >1 and <1. These groups can be identified on first glance, if the bars have their origin at 1.
Thanks again and best wishes,
Chris
June 4, 2015 at 12:42 am - Permalink
The trick is to make a dummy wave with the same number of points as your data waves. Fill it with the number you want to be at the center of the graph. Now make your category plot and after each data wave, append a new trace made with the dummy wave. Then set the Grouping mode of the real data trace to "Draw To Next". That will cause the bars to draw to the position of the dummy trace instead of to the edge of the plot.
In order to not see the dummy traces, hide the dummy traces
In order to get the axis along the center line instead of at the edge of the plot, use a free axis and set its positioning mode to "Crossing at".
In order to see the axis even though some of the bars will cross over it, turn on the "On top of traces" mode.
I could spend a lot of time explaining, and giving links to the help... Here is a function that encapsulates all of this, making the basic graph for you:
You feed it the name of your text wave containing the category text, then a list of the Y waves, then the number you want at the center of the plot (1 in your case). Here is an example with made-up data waves:
This function does not try to color the bars, it does not set log mode, and it does not apply the SwapXY mode to the graph. But it will make the basic graph that you can enhance in any way you wish.
I have attached a picture of a graph that I made using the function. I gave the bars some nice coloring after I made it.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Edited to add a couple comments, and to correct a mistake: the axis position is now correctly set.
June 4, 2015 at 10:07 am - Permalink
And it also seems that I almost had it before. I had created the dumy waves and tried around with grouping (I think "stack to next"). I got al the bars <1 correct but for the ones >1 I got no bars, but only vertical lines, where the bars should end.
Well, thanks again and have I nice weekend!
Chris
June 4, 2015 at 11:03 pm - Permalink
You're welcome. This should be easier!
Gosh. I'm not sure I would know how to do that if you actually wanted it :)
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 5, 2015 at 09:32 am - Permalink