f

#### Changing x-axis plot from right to left to left to right

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

 0
Jamie
8/14/2012 3:52:44 PM
comp.graphics.apps.gnuplot 5008 articles. 0 followers.

5 Replies
1187 Views

Similar Articles

[PageSpeed] 16

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.

 0
ISO
8/14/2012 5:12:33 PM
On Tuesday, August 14, 2012 6:12:33 PM UTC+1, Hans-Bernhard Br=F6ker wrote:
> On 14.08.2012 17:52, Jamie Rees wrote:
>=20
>=20
>=20
> > For mathematical reasons, I need to change the way that gnuplots my
>=20
> > data along the X axis from right to left to left to right (that is,
>=20
> > at the minute it plots from 20 down to 1, not from 1 to 20)
>=20
>=20
>=20
> That makes no sense whatsoever.  gnuplot generates some kind of picture.=
=20
>=20
>   It makes absolutely no difference whatsoever whether a line was drawn=
=20
>=20
> from left to right or right to left --- it'll be the same line in the=20
>=20
> end, consisisting of exactly the same pixels being coloured.
>=20
>=20
>=20
> So since this doesn't make sense, maybe you should tell us what your=20
>=20
> 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 d=
ata may include peaks and troughs which would otherwise mean the graph woul=
d go up and down.=20

I've worked out that I can do this is I check to see whether if the previou=
s next value along is higher than the previous, and if it is, assume the va=
lue of the previous and then plot a straight line.=20

Make much sense?
Thanks

Jamie

 0
Jamie
8/16/2012 3:33:49 PM
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.


 0
ISO
8/16/2012 8:17:39 PM
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


 0
sfeam
8/16/2012 9:01:09 PM
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

 0
Jamie
9/7/2012 9:42:51 AM
 Reply:

Similar Artilces:

How to plot two set of data with same y-axis but different x-axis to the left and right of the y-axis
Hello, How to plot two set of data with same y-axis but different x-axis. One dataset to the left and one dataset to the right of the y-axis. Tobias Gram wrote: > Hello, > > How to plot two set of data with same y-axis but different x-axis. > > One dataset to the left and one dataset to the right of the y-axis. Look for the example of "Double Axis Graphs" in the online document... -- dpb <none@non.net> wrote in message <iarovc$5a3$1@news.eternal-september.org>... > Tobias Gram wrote: > > Hello, > > > > How to...

How to plot two set of data with same y-axis but different x-axis to the left and right of the y-axis #2
Hello, How to plot two set of data with same y-axis but different x-axis. One dataset to the left and one dataset to the right of the y-axis. ...

what does SHIFT-left-or-right of up-down-left-right do?
Well, I know about shift up-and-down: shift-right ("red" or whatever) up and down on choose-box, HIST, things like that, take the cursor all the way to the beginning or the end. shift-left ("white") on up and down scroll the screen-full up or down (the FIRST such click *stupidly* goes to the final CURRENTLY-ON-SCREEN choice or whatever (meaning TWO double-button-pushes to scroll-down that FIRST time.) What are some of the OTHER possibilities, ie with the left and right arrows? Oh, apparantely undocumented, I've found (via mistaken key-pushes) that RIGHT-arrow will do a SWAP (on stack), and that an UP-arrow gets you into HIST (that HIST is *one nice feature*!) Other tricks with those arrows? Thanks! David David Combs wrote: > Well, I know about shift up-and-down: > > shift-right ("red" or whatever) up and down on > choose-box, HIST, things like that, take the > cursor all the way to the beginning or the end. > > shift-left ("white") on up and down scroll the > screen-full up or down (the FIRST such click > *stupidly* goes to the final CURRENTLY-ON-SCREEN > choice or whatever (meaning TWO double-button-pushes > to scroll-down that FIRST time.) > > > What are some of the OTHER possibilities, ie with the > left and right arrows? > > > Oh, apparantely undocumented,...

How can I plot two different y-axis (right and left) with a reverse-logarithmic x-axis?
Let us look at this example: x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x).*sin(10*x); [AX,H1,H2] = plotyy(x,y1,x,y2,'plot'); Now how can one reverse x-axis and at the same time in logarithmic scale? Even using (Tools>Edit plot>Property edittor>Axis) in Figure window is not giving controls on axis of second data sets (x,y2) plot here! ...

Changing M-<right,left> to C-<right,left>
Hello, I tried to change the word moving behaviour as shown in the post title and could not. Part of my .emacs is below. (global-set-key (kbd "C-z") 'undo) (global-set-key (kbd "C-<right>") 'forward-word) (global-set-key (kbd "C-<left>") 'backward-word) Finally, how could I open a new buffer proportionally in the same window? For instance, if I open a new buffer with C-x 2 and then open the new buffer the window is split in two equal halves. I'd prefer to have it 70%, 30%. TIA, Andre Luiz AndreLTR <andreltramos@gma...

How can I plot two curves with two different y-axis (placed at right and left) with one reverse-logarithmic x-axis?
How can I plot two curves with two different y-axis (placed at right and left) with one reverse-logarithmic x-axis? Something like this BUT with a reverse x-axis for both curves: x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x).*sin(10*x); [AX,H1,H2] = plotyy(x,y1,x,y2,'semilogx'); Thanks! "Amir " <albalbaloo@gmail.com> wrote in message <hrbv10$3ti$1@fred.mathworks.com>... > How can I plot two curves with two different y-axis (placed at right and left) with one reverse-logarithmic x-axis? > > Something like this BUT wit...

LEFT + LEFT vs LEFT + RIGHT
In order to do a full outer join in MySQL one must use a union. Is there any good reason to do SELECT ... LEFT JOIN UNION SELECT ... RIGHT JOIN rather than SELECT ... LEFT JOIN UNION SELECT ... LEFT JOIN with the tables swapped on the latter LEFT JOIN? Paul Lautman wrote: > In order to do a full outer join in MySQL one must use a union. > Is there any good reason to do > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > RIGHT JOIN > > rather than > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > LEFT JOIN > ...

does PHP read left to right or right to left?
I've two functions. currentHeadline looks in $_GET for a variable called 'image' and prints what it finds. showThumbnail takes an image for a parameter and resizes it before sending it to the screen. But when I do this: <?php showThumbnail(currentImage(), 20, 20); ?> showThumbnail is telling me that it is not being given a file name, and currentImage is printing the file name to the screen. How is that possible? What is the right way to do this? lawrence k wrote: > I've two functions. currentHeadline looks in$_GET for a variable > called 'image' and pr...

two tendencies plot for the left Y axis and one bar plot for the right axis ?
Hi all, I am wondering if you can provide some solutions. How to draw two tendencies plot for the left Y axis and 1 bar plot for the right axis? Thank you very much. Michael "Kuo-Hsien" <mchangks@hotmail.com> wrote in message news:i7vgc8$33h$1@fred.mathworks.com... > Hi all, > > I am wondering if you can provide some solutions. How to draw two > tendencies plot for the left Y axis and 1 bar plot for the right axis? Use PLOTYY with six input arguments, the fifth being the handle to the function that draws the "two tendencies" plot and the sec...

Text widget with mixed left-to-right and right-to-left Unicode text abilities?
Hi, is there one of these? If not I might have a go at writing a simple one of them.... Apologies if this is a FAQ, I did search the archive a bit before posting. Best, Charles. ...

Skybuck presents ShiftLeft( Left, Right, Shift ) and ShiftRight( Right, Left, Shift )
Hello, I think these two functions will come in very handy to solving the "write longword bits" problem. ShiftLeft( Left, Right, Shift ) ShiftRight( Right, Left, Shift ) Shifting with extra inputs is what is required to solve it nicely. // Begin of Code *** program Project1; {$APPTYPE CONSOLE} { Skybuck presents ShiftLeft( Left, Right, Shift ) and ShiftRight( Right, Left, Shift ) version 0.01 created on 5 may 2008 by Skybuck Flying. Be carefull though, the shift parameter must be 0 to 31. } uses SysUtils; // make overloaded versions for easy coding // display in big e... Plotyy changing left and right y axis tick mark fonts Hi! I've been trying to change tick mark number fonts of a plotyy graph. using [AX,H1,H2] = plotyy(ang_t,ang_,temp_t,temp_,'plot'); h = legend('Angle','Temp','C: Y w/ heater',2); set(h,'Interpreter','none','fontsize',16) set(get(AX(1),'Ylabel'),'String','Angle [\circ]','fontsize',16,'fontweight','b') set(get(AX(2),'Ylabel'),'String','Temp [\circC]','fontsize',16,'fontweight','b') ax1 = gca; set(ax1,'fontsize',16) I ... Left and Right axis We have been able to print a left and right axis in PROC GPLOT. Can this be done in PROC GCHART (VBAR). We have a group with high numbers on one side of the graph. The other side has low numbers. The high side dwarfs the low side and we have been requested to provide a different axis on the right side of the graph. Edward Gano wrote: > We have been able to print a left and right axis in PROC GPLOT. > > Can this be done in PROC GCHART (VBAR). > > We have a group with high numbers on one side of the graph. > The other side has low numbers. > > The high side dwarfs the... How to combine two functions in one plot using a left and a right y-axis Hi all, Can someone help me with the following problem. I want to combine two functions with different scales in one plot, using a left and a right y-axis. Is there a way to do this? Thanks, Ronald Ronald Cornelussen wrote: > Hi all, > Can someone help me with the following problem. I want to combine two > functions with different scales in one plot, using a left and a right > y-axis. Is there a way to do this? > Thanks, > Ronald > Hi Ronald, a colleague of mine wrote a package for this task. Currently, it has more or less the state of a beta-ve... how to combine two functions in one plot using a left and right y-axis? Hi all, Can someone help me with the following problem. I want to combine two functions with different y scales in one plot, using a left and right y-axis. Is there a way to do this? Thanks, Ronald Hi, http://support.wolfram.com/mathematica/graphics/2d/twoaxisgraph.html Regards Jens ronaldc wrote: > > Hi all, > Can someone help me with the following problem. I want to combine two > functions with different y scales in one plot, using a left and right > y-axis. Is there a way to do this? > Thanks, > Ronald ... Change the port from right to left? How can I put the output port on the left side of the block? Mike. Mike wrote: > How can I put the output port on the left side of the block? > Mike. > > Choose `Flip' in the Edit menu then just click on the block you want to swap i/o ports with. Actually you can flip blocks that just have output too. I don't think ports that are red can be flipped...they haven't for me anyway. jn ... Re: Left and Right axis You might be able to handle your two axis problem by using Proc Gplot with symboln i=needle. This will probably not work if you need a very complex chart but may be worth exploring. Nat Wooding ... Are you Left or Right? Take the test http://www.politicalcompass.org/ Robs score, which surprised me a bit Economic Left/Right: 1.38 Social Libertarian/Authoritarian: -0.21 Shit, wrong group sorry "rob" <roball@xtra.co.nz> wrote in message news:t2vJd.11457$mo2.882985@news.xtra.co.nz... > Take the test > > http://www.politicalcompass.org/ > > Robs score, which surprised me a bit > Economic Left/Right: 1.38 > Social Libertarian/Authoritarian: -0.21 > "rob" <roball@xtra.co.nz> wrote in message news:t2vJd.11457\$mo2.882985@news...

left, right?
What function returns some number of characters on the right or left of a string? i.e. if I have the string 'filename', is there a command like Left('filename',4) = file? Thanks. asdd12 wrote: > > > What function returns some number of characters on the right or > left > of a string? i.e. if I have the string 'filename', is there a > command > like Left('filename',4) = file? Thanks. >> f='filename' f = filename >> f(1:4) ans = file In article <ef4d6a8.-1@webcrossing.raydaftYaTP>, nospam@nospam.com says... &...

Right or Left ?
A simple multimedia setup can be a display monitor with speakers positioned on both sides. Think of this equipment as being on a 'stage' in a theater, and the user as being the 'audience' in that theater. What is called the "left" speaker -- is it the one on the left of the audience (as viewed by the audience), or the one on the left of the stage (as viewed by an actor standing ON the stage, facing out towards the audience) ? mikus Sir: Mikus Grinbergs wrote: > A simple multimedia setup can be a display monitor with > speakers positioned on...

plot from top to bottom, not left to right
I look for a possibiliy to plot my 2D-Data from top to bottom and not from left to right how it is done per default. Thomas Bertow wrote: > > > I look for a possibiliy to plot my 2D-Data from top to bottom and > not > from left to right how it is done per default. > plot(x,y) could easily be turned to for example: plot(winds,altitudes) if you have wind vectors in the matlab variable winds at altitudes altitudes. HTH, Bjorn Bjorn Gustavsson wrote: > ... > plot(x,y) could easily be turned to ... > HTH, > Bjorn It works :). Thanks Bjorn. If you know it, it's ...

Align javascript alert message to right AND / OR make the direction as RIGHT-TO-LEFT
Dear Friends, I am wondering, how can i show Alert() messages includes text aligned to the right of the message box on the screen. i am looking for something like the "\n" to do this. additionally, How can i show the same message in a Right-To-Left format. Best Regards, Oran MEIR Hi Oran As far as I know you can't script the MS alert box. The good news is that you can build your own and use CSS to make the content right to left and text align to the right. I assume your content is Hebrew and you have stopped using the old backward font system for HTML. ;>) Then again ...

beamer: how to show graphics progressively from left to right
I have frames where I want to show several graphs (scaled in minipages) so graphs 1, ... i appear on slide i, as boxes from left to right, as they would without overlays. I've tried a variety of things, starting with \pause, but keep getting errors, or the wrong layout. [All my files are .eps, so I'm using latex+dvipdf -> .pdf] This gives me all 3 figures on three successive slides. What's wrong? \begin{frame} \frametitle{1833: \emph{Essai sur la statistique morale...}} % three figs side-by-side \onslide<1->{ \begin{minipage}[c]{.32\textwidth} \includegrap...

Mail.app -- mailbox tray on the right or left?
My "tray" of mailboxes in Mail.app always used to appear on the left. Today after starting my machine, it appears on the right. Option or command-clicking on the "Mailboxes" icon in the toolbar does nothing. Does anyone know how to switch the position of the pop-up tray? In article <271120030757094994%jimpaul@nospam.yahoo.com>, Jim <jimpaul@nospam.yahoo.com> wrote: > My "tray" of mailboxes in Mail.app always used to appear on the left. > Today after starting my machine, it appears on the right. Option or > command-clicking on the "Mail...

Web resources about - Changing x-axis plot from right to left to left to right - comp.graphics.apps.gnuplot

Changing room - Wikipedia, the free encyclopedia
A changing room , locker room , dressing room (usually in a sports, theater or staff context) or changeroom (regional use) is a room or area ...

Beyond Timeline: The Changing Face Of Facebook Ads
Despite the hype, timeline may not be the most exciting, or important change coming on March 30. Expanded advertising opportunities may unlock ...

Robert Scoble - Micromedia, how it's changing what we blog - Facebook
Jeremiah Owyang wrote an interesting piece about micromedia and how it's changing what we do on blogs and how we distribute media (er, ideas, ...

8 Ways the Changing Facebook Home Page Will Affect Application Virality
For developers who live and die by the changes Facebook makes to the way information flows through the service, every little Facebook tweak has ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

The Right and Wrong Reasons for Changing Jobs
... your profile is a clue to the folks at LinkedIn that you’re thinking of switching jobs, so don’t be The Right and Wrong Reasons for Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 3/2/2016 5:22:05 AM