I want to fill my gnuplot charts with variable colors using flooded cubes

This should not be such a big problem, but it seems to be so. I have a file with three columns - x, y data and hex color data.

plot "data" using 1:2:3 with filledcurves x1 linecolor variable

If I use this code, the line above my plot - the border - is really colored like this (using hex color data). However, I want to make sure that the fill color also matches the line color. Now he is gray.

Referring to the gnuplot help, I read this at fillstyle:

The option solidcauses solid color to fill if the terminal supports this. The parameter densityindicates the intensity of the fill color. At a density0.0, the field is empty, at density1.0, the inner area has the same color as the current line type.

I interpret this as the following. If I use:

set style solid 1

This will make my padding solid and copy the color of the current line type. This line type currently has a set of linecolor "variables", so it should just copy that value, right? However, it is not.

The main question to answer is:

How to make certain parts of the style filledcurveshave a different fillcolor?

+4
source share
1 answer

This feature has not yet been released in stable gnuplot(2016-01-30).

A similar question and answer with variable fill is shown here: Gnuplot fillcurves with palette

However, another solution adapted fromfeature-request ,

stats infile using 2
N = STATS_blocks
set cbrange [0:N]
plot for [poly=0:N-1] "data" index poly using 1:2 with filledcurves x1 fillcolor palette cb poly lw 2

. , (2 )

, (2016-01-29), CVS, gnuplot smth.

plot 'data' using 1:2:(column(-2)) with filledcurves closed fillcolor palette z

.

+3

Source: https://habr.com/ru/post/1626605/


All Articles