Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3470 > unrolled thread

Change sign in column with calculated number

Started byMichael Okuntsov <okuntsov.mikhail@yandex.ru>
First post2016-11-22 17:28 +0700
Last post2016-11-22 18:04 +0700
Articles 2 — 1 participant

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Change sign in column with calculated number Michael Okuntsov <okuntsov.mikhail@yandex.ru> - 2016-11-22 17:28 +0700
    Re: Change sign in column with calculated number Michael Okuntsov <okuntsov.mikhail@yandex.ru> - 2016-11-22 18:04 +0700

#3470 — Change sign in column with calculated number

FromMichael Okuntsov <okuntsov.mikhail@yandex.ru>
Date2016-11-22 17:28 +0700
SubjectChange sign in column with calculated number
Message-ID<o116jh$c19$1@dont-email.me>
Hello,
my gnuplot script is generated by another script written in perl. I want 
to change the sign of plotted values in this plot command:

plot [][] for [i=1:11] 'tests.dat' every :::10::10 using 1:i+1 lt i+2 lw 
6 w linesp

I've tried to change "using 1:i+1" to 1:(-$(i+1)), 1:$(-$(i+1)) etc, but 
it does not work. How can this be done?

[toc] | [next] | [standalone]


#3471

FromMichael Okuntsov <okuntsov.mikhail@yandex.ru>
Date2016-11-22 18:04 +0700
Message-ID<o118m5$it1$1@dont-email.me>
In reply to#3470
22.11.2016 17:28, Michael Okuntsov пишет:
> Hello,
> my gnuplot script is generated by another script written in perl. I want
> to change the sign of plotted values in this plot command:
>
> plot [][] for [i=1:11] 'tests.dat' every :::10::10 using 1:i+1 lt i+2 lw
> 6 w linesp
>
> I've tried to change "using 1:i+1" to 1:(-$(i+1)), 1:$(-$(i+1)) etc, but
> it does not work. How can this be done?

Found the answer, using 1:(-column(i+1))

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web