|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
histogram with negativ valuesHello,
I tried the histogram function with gnuplot. I have positive and negative values. I would expect that negative values will be start from zero but in the opposite direction as the positive values. I would also expect this for the stacked histogram. But gnuplot does not work this way. Is this a bug? Will this be changed in the future. I could do a multiplot as workarround but I'm not very happy with the solution. Thanks Christian ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: histogram with negativ valuesOn Wednesday 09 July 2008 02:58:05 Christian wrote:
> Hello, > > I tried the histogram function with gnuplot. I have positive and negative > values. I would expect that negative values will be start from zero but in > the opposite direction as the positive values. They do, yes. set style plot histogram cluster set auto y plot 'foo' (column(1)), 'foo' (-column(1)) gives you one bar going up and one bar going down for each entry. > I would also expect this for the stacked histogram. That would make no sense. It is not possible to mix positive and negative values in a stacked histogram. The resulting represenation has no unique interpretation. In a nutshell, the plot would be useless. > But gnuplot does not work this way. > > Is this a bug? Will this be changed in the future. No bug that I know of. If you have a script that mis-behaves, please provide the script. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: histogram with negativ values>From: "Ethan Merritt" <merritt@...> > On Wednesday 09 July 2008 02:58:05 Christian wrote: >> Hello, >> >> I tried the histogram function with gnuplot. I have positive and negative >> values. I would expect that negative values will be start from zero but >> in >> the opposite direction as the positive values. > > They do, yes. > set style plot histogram cluster > set auto y > plot 'foo' (column(1)), 'foo' (-column(1)) > gives you one bar going up and one bar going down for each entry. >> I would also expect this for the stacked histogram. > > That would make no sense. It is not possible to mix positive and negative > values in a stacked histogram. The resulting represenation has no > unique interpretation. In a nutshell, the plot would be useless. It would make sense in some cases. For example I have 4 values e.g. a, b, c and d which change over the time. The values c and d are negativ and it should a + b = c + d. So I would like to plot all in a stacked histogram a and b on the positive side and c + d on the negativ. I think plotting negativ values stacked on the negative axis makes more sense than subtracting the negative value from the stacked bar. This makes the plot senseless for me. Cheers Christian ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
|
Re: histogram with negativ valuesOn Wednesday 09 July 2008 15:16:03 Christian wrote:
> > >From: "Ethan Merritt" <merritt@...> > > On Wednesday 09 July 2008 02:58:05 Christian wrote: > >> Hello, > >> > >> I tried the histogram function with gnuplot. I have positive and negative > >> values. I would expect that negative values will be start from zero but > >> in > >> the opposite direction as the positive values. > > > > They do, yes. > > set style plot histogram cluster > > set auto y > > plot 'foo' (column(1)), 'foo' (-column(1)) > > gives you one bar going up and one bar going down for each entry. > > >> I would also expect this for the stacked histogram. > > > > That would make no sense. It is not possible to mix positive and negative > > values in a stacked histogram. The resulting represenation has no > > unique interpretation. In a nutshell, the plot would be useless. > > It would make sense in some cases. For example I have 4 values e.g. a, b, c > and d which change over the time. The values c and d are negativ and it > should a + b = c + d. So I would like to plot all in a stacked histogram a > and b on the positive side and c + d on the negativ. Ah, I see. That would be a special case of a "back-to-back" or "violin" plot, one where you have pre-modified the data so that one subset is always positive and a different subset is always negative. I think it is possible to do that in a single plot by filtering the data as you go, but I'd have to play around with the scripting. I guess this is what you meant when you said there was an option to use multiplot. Now I understand, but I think you can probably accomplish this without using the "multiplot" command. -- Ethan A Merritt ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ gnuplot-beta mailing list gnuplot-beta@... https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
| Free Forum Powered by Nabble | Forum Help |