gnuplot - filled curve with palette color

oriol

I'm trying to plot a histogram in gnuplot, where the bars are characterized by their color (intensity) instead of their height (frequency). To do so, I want to fill each bar with a color corresponding to the third column (which stands for this intensity) of a data file, defined in a palette. All the bars have the same height y=1 and the same width dx=1. The important part of the script looks like

plot for [ii=0:N] 'data.dat' index ii u 1:2:3 w filledcu y1=0 lc palette

My problem is that the ii=0 takes the right color of the palette and fills the first bar, but from there on all the others are the same color ( same intensity ) than ii=0.

My data file looks like:

X Y Intensity

1 1 0.6

2 1 0.6

...

Any idea to fill with the right color ?

Christoph

The filledcurves plotting style doesn't support color gradients, see Gnuplot filledcurves with palette.

Since you have the same height for every bar, you can use the boxes plotting style:

set style fill solid noborder
plot 'data.dat' using 1:2:3 with boxes lc palette

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

GNUPLOT: How to set reverse HOT color palette

From Dev

GNUPLOT: logarithmic color box with plot & palette

From Dev

Gnuplot - defining spacing of color palette with a function

From Dev

Gnuplot: splot grid filled with an exactly one color

From Dev

Filled areas in gnuplot that disappear when the curve exits the graph area

From Dev

Managing the palette indicators in gnuplot

From Dev

Gnuplot default palette

From Dev

Gnuplot: change automatic palette

From Dev

Set color to grey for points below some cutoff when plotting with palette in Gnuplot

From Dev

Material design color palette

From Dev

Associating a variable to a color palette?

From Dev

SharePoint Color Palette Tool

From Dev

Setting color palette in R

From Dev

changing the color palette in ggplot

From Dev

Contrasting color palette in python

From Dev

How can I add specified color to 2-d curve in 3-d plot in Gnuplot?

From Dev

Gnuplot filled curves not showing properly

From Dev

Incorrect color getting filled

From Dev

gnuplot and octave: a distribution curve with a skew

From Dev

Calculate area under curve in gnuplot

From Dev

Calculate area under curve in gnuplot

From Dev

How to use "var" and "palette" together in gnuplot?

From Dev

Gnuplot: Set palette colours for absolute values

From Dev

How to make a plot of positions with palette in Gnuplot?

From Dev

plotting gnuplot with palette showing some labels

From Dev

gnuplot: plotting single palette in multiplot mode

From Dev

How to make a plot of positions with palette in Gnuplot?

From Dev

pleasing palette random color generation

From Dev

Obtaining a cmap for color brewer palette

Related Related

HotTag

Archive