Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #352
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: 2d plot with varying line color |
| Followup-To | comp.graphics.apps.gnuplot |
| Date | 2011-06-01 11:19 -0700 |
| Organization | gnuplot development team |
| Message-ID | <is5vri$cbd$1@dont-email.me> (permalink) |
| References | <eb8fee93-9b6a-4482-8d65-e18e3c014e33@l26g2000yqm.googlegroups.com> |
Followups directed to: comp.graphics.apps.gnuplot
antia wrote: > Hi all, > I would like to make an ordinary 2D plot of a function where the line > color smoothly changes along a gradient or palette. Is this possible? No, but... > I know similar things can be done for 3D plots ... You can use a 2D projection of a 3D plot for this. See "help special-filenames" > A minimal code of what I am trying to plot is: > > -- > plot erf(x) notitle with lines > -- set xrange [-5:5] set yrange [-1:1] set view map splot '++' using 1:(erf($1)):(erf($1)) with lines lc palette That gets you the plot you want with colors assigned from gnuplot's default black->blue->orange->yellow palette. For examples of other palette definitions, see "help palette" or http://gnuplot.sourceforge.net/demo_cvs/pm3dcolors.html > > I would like the erf function to be red for low values of x and move > towards blue on high values of x, i.e. I would like a temperature-like > scale. > > Thanks for any help!
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
2d plot with varying line color antia <antia.lamas@gmail.com> - 2011-06-01 09:38 -0700 Re: 2d plot with varying line color sfeam <sfeam@users.sourceforge.net> - 2011-06-01 11:19 -0700
csiph-web