Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4281 > unrolled thread
| Started by | Henryk Nowicki <"Henryk Nowicki"@doe.com> |
|---|---|
| First post | 2020-01-09 19:58 +0000 |
| Last post | 2020-01-10 19:25 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
How to generate series of plots programmatically? Henryk Nowicki <"Henryk Nowicki"@doe.com> - 2020-01-09 19:58 +0000
Re: How to generate series of plots programmatically? Karl Ratzsch <mail.kfr@gmx.net> - 2020-01-10 19:25 +0100
| From | Henryk Nowicki <"Henryk Nowicki"@doe.com> |
|---|---|
| Date | 2020-01-09 19:58 +0000 |
| Subject | How to generate series of plots programmatically? |
| Message-ID | <qv80lr$n7k$1@dont-email.me> |
Hi, all! How to generate series of plots with exactly the same numbers of finance bars on the each plot? What I want interactively can be achievid with something like this: .... set xrange[0:100] replot set xrange[100:200] replot set xrange[200:300] replot set xrange[300:400] replot set xrange[400:500] etc. to the end of datafile Here is the gnuplot script I'm working on: #!/usr/local/bin/gnuplot set term pngcairo enhanced font ",8" size 1600,900 set output "main.png" set boxwidth 0.5 relative set grid set style line 1 lc rgb '#3B444B' lt 1 #border set border linestyle 1 set errorbars 2.6 set border 3 set tics nomirror set xtics 2 set xtics rotate by -90 set ytics 500 set xrange [30:60] plot "< paste -d, main.db fast_sma long_sma signal.db" u 0:2:3:4:5 w finance lc rgb '#3B444B' lw 1.4, \ "" u 0:13 w l lc rgb '#FF7F50' lw 1.8, \ "" u 0:14 w l lw 1.8, \ "" u 15:16 w p lt 3 lc rgb 'red' Thank you!
[toc] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2020-01-10 19:25 +0100 |
| Message-ID | <qvafio$rae$1@solani.org> |
| In reply to | #4281 |
Several possibilities, check "help do", and "help plot for".
The range iteration is a bit tricky with "plot for" i think, the "do
for [] {}" loop has the disadvantage that you need to have a plot
already before iterating through you data with "replot". Try
generating an empty plot beforehand, e.g. via
plot 0 lc rgb "white" notitle
if necessary.
Karl
Am 09.01.2020 um 20:58 schrieb Henryk Nowicki:
> Hi, all!
>
> How to generate series of plots with exactly the same numbers of finance bars on the
> each plot?
>
> What I want interactively can be achievid with something like this:
>
> ....
> set xrange[0:100]
> replot
> set xrange[100:200]
> replot
> set xrange[200:300]
> replot
> set xrange[300:400]
> replot
> set xrange[400:500]
>
> etc. to the end of datafile
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web