Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1321 > unrolled thread
| Started by | Jamie Rees <jamierees@gmail.com> |
|---|---|
| First post | 2012-08-14 08:52 -0700 |
| Last post | 2012-09-07 02:42 -0700 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Changing x-axis plot from right to left to left to right Jamie Rees <jamierees@gmail.com> - 2012-08-14 08:52 -0700
Re: Changing x-axis plot from right to left to left to right Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-08-14 19:12 +0200
Re: Changing x-axis plot from right to left to left to right Jamie Rees <jamierees@gmail.com> - 2012-08-16 08:33 -0700
Re: Changing x-axis plot from right to left to left to right Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-08-16 22:17 +0200
Re: Changing x-axis plot from right to left to left to right sfeam <sfeam@users.sourceforge.net> - 2012-08-16 14:01 -0700
Re: Changing x-axis plot from right to left to left to right Jamie Rees <jamierees@gmail.com> - 2012-09-07 02:42 -0700
| From | Jamie Rees <jamierees@gmail.com> |
|---|---|
| Date | 2012-08-14 08:52 -0700 |
| Subject | Changing x-axis plot from right to left to left to right |
| Message-ID | <4d60f00e-a5d4-4905-98a8-820335c7a6e0@googlegroups.com> |
Hi, For mathematical reasons, I need to change the way that gnuplots my data along the X axis from right to left to left to right (that is, at the minute it plots from 20 down to 1, not from 1 to 20) I am aware of set xrange reverse but this just inverts the whole graph and displays from 17 .... 1 down along the x-axis rather than plotting the other way round. I'm rather stuck and would appreciate some advice. Regards Jamie
[toc] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2012-08-14 19:12 +0200 |
| Message-ID | <a8vf86FmugU1@mid.dfncis.de> |
| In reply to | #1321 |
On 14.08.2012 17:52, Jamie Rees wrote: > For mathematical reasons, I need to change the way that gnuplots my > data along the X axis from right to left to left to right (that is, > at the minute it plots from 20 down to 1, not from 1 to 20) That makes no sense whatsoever. gnuplot generates some kind of picture. It makes absolutely no difference whatsoever whether a line was drawn from left to right or right to left --- it'll be the same line in the end, consisisting of exactly the same pixels being coloured. So since this doesn't make sense, maybe you should tell us what your actual problem is, so we can find out how that might be solved.
[toc] | [prev] | [next] | [standalone]
| From | Jamie Rees <jamierees@gmail.com> |
|---|---|
| Date | 2012-08-16 08:33 -0700 |
| Message-ID | <4dbdcabe-5d79-4085-8afc-127f4dcf0c9b@googlegroups.com> |
| In reply to | #1322 |
On Tuesday, August 14, 2012 6:12:33 PM UTC+1, Hans-Bernhard Bröker wrote: > On 14.08.2012 17:52, Jamie Rees wrote: > > > > > For mathematical reasons, I need to change the way that gnuplots my > > > data along the X axis from right to left to left to right (that is, > > > at the minute it plots from 20 down to 1, not from 1 to 20) > > > > That makes no sense whatsoever. gnuplot generates some kind of picture. > > It makes absolutely no difference whatsoever whether a line was drawn > > from left to right or right to left --- it'll be the same line in the > > end, consisisting of exactly the same pixels being coloured. > > > > So since this doesn't make sense, maybe you should tell us what your > > actual problem is, so we can find out how that might be solved. I'm using gnuplot in conjunction with a dotNet application which has a SQL Server backend. I am plotting data stored on the SQL Server. I need to be able to manipulate the data being plotted on the graph. I need to be able to draw a line which steps down from left to right, when the data may include peaks and troughs which would otherwise mean the graph would go up and down. I've worked out that I can do this is I check to see whether if the previous next value along is higher than the previous, and if it is, assume the value of the previous and then plot a straight line. Make much sense? Thanks Jamie
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2012-08-16 22:17 +0200 |
| Message-ID | <a952r0F8ntU1@mid.dfncis.de> |
| In reply to | #1332 |
On 16.08.2012 17:33, Jamie Rees wrote: > I need to be able to manipulate the data being plotted on the graph. So what does the direction of plotting have to do with that? If you want to plot data that's different from the actual one you pulled out of your database, what keeps you from doing so in the program that sits between the DB and gnuplot? > I need to be able to draw a line which steps down from left to right, > when the data may include peaks and troughs which would otherwise > mean the graph would go up and down. That sounds like you might be talking about a monotonically falling smallest upper bound of the actual data, but I'm afraid you lost me halfway along that sentence. > I've worked out that I can do this is I check to see whether if the > previous next value along is higher than the previous, and if it is, > assume the value of the previous and then plot a straight line. I guess you meant "horizontal line" there. > Make much sense? Frankly? No.
[toc] | [prev] | [next] | [standalone]
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Date | 2012-08-16 14:01 -0700 |
| Message-ID | <k0jn2o$4d9$1@dont-email.me> |
| In reply to | #1332 |
Jamie Rees wrote: > On Tuesday, August 14, 2012 6:12:33 PM UTC+1, Hans-Bernhard Bröker wrote: >> On 14.08.2012 17:52, Jamie Rees wrote: >> >> > For mathematical reasons, I need to change the way that gnuplots my >> > data along the X axis from right to left to left to right (that is, >> > at the minute it plots from 20 down to 1, not from 1 to 20) gnuplot plots points in the order they arrive in. left-to-right, right-to-left, or non-monotonic ordering on x is totally irrelevant. >> So since this doesn't make sense, maybe you should tell us what your >> actual problem is, so we can find out how that might be solved. > > I need to be able to manipulate the data being plotted on the graph. I > need to be able to draw a line which steps down from left to right, when > the data may include peaks and troughs which would otherwise mean the > graph would go up and down. If you meant the each point is only plotted if it is lower than previous points, then the following command would do the trick: cap = SOME_VERY_BIG_NUMBER plot foo using 1:( $2 > cap ? cap : cap=$2 ) with lines or if you want to leave a gap where the limiting cap was triggered plot foo using 1:( $2 > cap ? NaN : cap=$2 ) with lines > I've worked out that I can do this is I check to see whether if the > previous next value along is higher than the previous, and if it is, > assume the value of the previous and then plot a straight line. > > Make much sense? > Thanks > > Jamie
[toc] | [prev] | [next] | [standalone]
| From | Jamie Rees <jamierees@gmail.com> |
|---|---|
| Date | 2012-09-07 02:42 -0700 |
| Message-ID | <63ede30e-c713-4b14-8e75-78936e9e9664@googlegroups.com> |
| In reply to | #1335 |
Ah I see now - thanks. I did assume it was a gnuplot problem but actually an issue with an SQL statement. I've got another issue now, but I'll post that in a seperate thread. Thanks, Jamie
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web