Draw Bar Graph in XY Plot or ZedGraph

Draw Bar Graph in XY Plot or ZedGraph - Messages

#1 Posted: 11/7/2016 2:24:13 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Hi,
It will be much appreciated if somebody can show me how to draw a bar graph in X-Y Plot or ZedGraph,
using two vectors as shown please ("t" in x axis, "Rain" in y axis).

Bar Graph.jpg
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#2 Posted: 11/7/2016 2:51:22 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

As far as I know there are no bar graphs in SMath. At least, there is no easy way to obtain them.
I wish I was wrong about it.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 11/7/2016 3:51:00 PM
Davide Carpi

Davide Carpi

1415 likes in 2873 posts.

Group: Moderator

Just in case, might worth the effort to try with the modeller region

Wrote

As far as I know there are no bar graphs in SMath.


True

Show Spoiler

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 users liked this post
NDTM Amarasekera 11/7/2016 10:51:00 PM, Radovan Omorjan 11/7/2016 4:28:00 PM
#4 Posted: 11/7/2016 4:36:53 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Somehow Davide, you crossed my mind when I posted the answer
It seems I was right

Wish you the best of luck,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
2 users liked this post
NDTM Amarasekera 11/7/2016 10:51:00 PM, Davide Carpi 11/8/2016 6:03:00 AM
#5 Posted: 11/7/2016 10:48:04 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Thank you very much Davide and Radovan for your clarifications.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#6 Posted: 11/7/2016 11:13:50 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Thank you again Davide and Radovan.
To demonstrate a Flood Hydrograph, it was only possible to draw a line graph (in reverse order) in ZedGraph.
In X-Y Plot reverse order is not possible.

ZedGraph Plot.jpg
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
1 users liked this post
Radovan Omorjan 11/8/2016 3:42:00 AM
#7 Posted: 11/8/2016 12:23:45 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

I know nothing about "Zedgraph".
I can se Davide had a "cat in the hat".
Stem plot does same/different in no time
except for the red 0 rain [<20 sec]

Cheers, Jean

Rainfall.gif

Forum Rainfall.sm (87 KiB) downloaded 67 time(s).
2 users liked this post
Davide Carpi 11/8/2016 6:03:00 AM, Radovan Omorjan 11/8/2016 3:42:00 AM
#8 Posted: 11/8/2016 2:47:45 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

This scrap proposal makes me happy for some
distinctive small project. Manual but convenient
for small projects. For larger size and unicolor
the project needs be constructed around a counter.

Jean

File not found.File not found.
2 users liked this post
Radovan Omorjan 11/8/2016 3:42:00 AM, Davide Carpi 11/8/2016 6:03:00 AM
#9 Posted: 11/8/2016 3:02:22 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... next version

Bar Plot_0.gif
4 users liked this post
frapuano 11/8/2016 5:02:00 AM, Radovan Omorjan 11/8/2016 3:42:00 AM, Davide Carpi 11/8/2016 6:03:00 AM, NDTM Amarasekera 11/8/2016 6:40:00 AM
#10 Posted: 11/8/2016 6:44:08 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Thank you for the examples.
I will try my best to use them to suit my problem.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#11 Posted: 11/8/2016 7:12:41 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Simple example

2016-11-08_15-11-46.png
Russia ☭ forever, Viacheslav N. Mezentsev
2 users liked this post
Radovan Omorjan 11/8/2016 7:29:00 AM, frapuano 11/8/2016 8:06:00 AM
#12 Posted: 11/8/2016 8:13:06 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Many thanks to Uni, for the simple example.
I was expecting a response from you also.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#13 Posted: 11/8/2016 10:38:56 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Bar Plot_1.gif
#14 Posted: 11/8/2016 11:07:35 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

In the Viacheslav proposal, you don't see bar not plotting equally wide.
Because the bars are so wide ! In the real project I proposed, the bars
are much thiner for dense project. Thus there will always be at least
"one" bar looking thiner because of the plot pixel impossible to match
perfectly along the stretching of the plot.

Cheers, Jean
#15 Posted: 11/9/2016 7:26:03 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Wrote

Simple example



I used method proposed by Uni to plot Bar Graph to show rainfall in ZedGraph as shown (in reverse order).

File not found. File not found.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#16 Posted: 11/9/2016 11:54:21 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Thanks for the "Zed Graph" snippet. I don't have this plugin
whereas I will stay Smath 5346, and don't intend to upgrade.
The attached document is for publising projects.

Cheers, Jean

Bar Plot Quuick.gif

Bar Plot_2.gif

2D Bar Plot Custom.sm (35 KiB) downloaded 93 time(s).
  • New Posts New Posts
  • No New Posts No New Posts