Bar graphs - 2 questions

Beta releases, announcements and anything else that doesn't fit below. Please read the <B>Welcome</B> topic.

Moderator: DPlotAdmin

Post Reply
DCdenizen
Posts: 21
Joined: Mon Sep 08, 2008 9:11 pm

Bar graphs - 2 questions

Post by DCdenizen »

I need to overlay a scatter plot onto of a bar graph, such that the area of the bars in the bar graph encompass separate sets of points. To do this, I thought I would take the x-value midpoint of each set of points, use these as the x-values for the bars, and adjust the width of the bars to include all points in each set.

Two complications became apparent:

It seems the x-values for bar graphs dictate the start point for the bars, rather than the mid point.

I can't seem to identify a method by which I can adjust the width of the bars in the bar chart.

Could you let me know if there is some workaround for these questions?

Thanks!

Also, is there some way to fill in the bar areas with a solid color?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

I need to overlay a scatter plot onto of a bar graph,
I recently added an (as yet) undocumented macro command to overlay one plot with another, so that you can mix, for example, 2D contour plots with line graphs. You can see an example of this here: http://www.dplot.com/forums/viewtopic.php?t=824

Unfortunately I botched up the most important feature: overlaying bar charts with line graphs or vice versa. This is working on the version I have; will be available in the next release.
It seems the x-values for bar graphs dictate the start point for the bars, rather than the mid point.
That's correct. The only way around that at present is to apply an offset to each of your X values. I can probably add an option to use the midpoint instead, but I need to think on all the possible arrangements before I blindly add a new option. Will definitely give this some thought.
I can't seem to identify a method by which I can adjust the width of the bars in the bar chart.
Right-click on the plot and select "Bar Chart Options", or alternatively select Options>Linear/Log Scaling>Bar Chart Options. From what you described you'll probably want to check "Bars span intervals in X" and "Solid" under "Pattern". If you want the bars to fill the width between X values, set the "Bar width" value to 100. And if these are options you think you'll always want as defaults, click the "Make defaults" button.
Visualize Your Data
support@dplot.com
DCdenizen
Posts: 21
Joined: Mon Sep 08, 2008 9:11 pm

Post by DCdenizen »

I was able to locate the BarWidth command, but I still haven't figured out whether it is possible to center the bars on their respective x-value. Is this possible?

Also, I can't seem to successfully overlay a scatter plot on a bar graph. Any idea what's going on?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

I was able to locate the BarWidth command, but I still haven't figured out whether it is possible to center the bars on their respective x-value. Is this possible?
Not currently possible.
Also, I can't seem to successfully overlay a scatter plot on a bar graph. Any idea what's going on?


What's going on is I fouled up the OverlayDocument command. This is fixed and will be available in the next release (probably early next week).
Visualize Your Data
support@dplot.com
DCdenizen
Posts: 21
Joined: Mon Sep 08, 2008 9:11 pm

Post by DCdenizen »

Disregard the previous message. Thanks for your reply; when do you think you'll be able to distribute the new version?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Thanks for your reply; when do you think you'll be able to distribute the new version?
Crossing fingers, early next week. Most likely Monday or Tuesday. The OverlayDocument fix for bar charts is in there and will definitely be available. Offsetting bars such that the reference X is at the middle of the bar - probably not. If your bars are evenly-spaced you can do this fairly easily yourself with Edit>Operate on X, with X=X-<spacing/2>. If the bars are NOT evenly spaced - well, that's a problem for you and for me and is the reason I'm reluctant to add this new feature w/o spending some time thinking about it.
Visualize Your Data
support@dplot.com
DCdenizen
Posts: 21
Joined: Mon Sep 08, 2008 9:11 pm

Post by DCdenizen »

Any luck on this? It goes without saying, but thanks for the incredible graphing package!
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Sorry for the delay. New version will most likely be available Wednesday night.
Visualize Your Data
support@dplot.com
DCdenizen
Posts: 21
Joined: Mon Sep 08, 2008 9:11 pm

Post by DCdenizen »

Any luck with this?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

It has been available for a couple of days. If you're on the mailing list you should have received a mail with the link. Otherwise you can get it with "Check for Updates" on the Help menu.
Visualize Your Data
support@dplot.com
Post Reply