bar chart - Gnuplot: how to fill a bar with both a color background and a pattern -
I want to fill once with a color background and a pattern. It is possible in gnuplot
I am using gnuplot 4.6.5
The code I am now:
# set terminal pngcairo transparent extended font "Aerial, 10" FontScale 1.0 Size 500, 350 # Set Output 'Histogram. 2 'set box width 0.9 set full set style solid 1.00 border Lieutenant -1 right top vertical right norvans newborn optotics ninox set style histogram clustered difference 1 title offset character set 0, 0, set data file' - 'set style data histogram set xtics 0,0 by nominal rotate on border scale -45 offset character 0, 0, 0 automatically adjusted xtics norangelimit font ", set 8" set xtics (set) "Amé from Northern Europe Selected data columns as Ika immigration \ n plus selected boxes Histogram "I = 22 set yrange [0: 2000] set style line 1 LC RGB 'orange'; Set style line 2 lc rgb 'pink'; I: xtic (1) By using Ti Colonel L% i + 2 + 1 [i = 2: 7] plot for 'data.dat'; Data file:
area Denmark France Demark - women France-women Demark member France-men 1891-1900 1000 1100 500 600 500 500 1901 -1910 1500 1600 1000 600 500 1000 Here are the links to download scripts: and data files:
The script gives me:
What do I need:
If someone corrects me code If you can help with the song, it would be greatly appreciated thanks to producing the second number.
This is very difficult because you can not change the background color of the fill pattern and by default the pattern Background color is white, and is not transparent or empty
The only terminal which can be manipulated sufficiently is the LuaTix terminal. Here, I first attract the box of all colors, and for later in a second iteration, to fill the fill pattern a new journey, I have the option of newhistogram which, however, causes an interval in the story Have to use
To remove the white background of the filling pattern, I laughed the relevant parts away from the output stream with sed , but it works:
Set Terminal Lace Tails Standalone Size 5in, 3in Color Set Output '| Sed's / \\ gpfill {color = gpbgfillcolor} // g. 'Histograms.tex' set boxwidth 0.9 Full set style concrete 1.00 Limit Lieutenant -1 Set inside top key Top vertical right noreverse Noehsted autotilities Nonoconal set Style histogram Clustered Gap 1 Title Offset Character 0, 0, 0 Set Datafile '-' Set Style Lost Data Histogram Scale Set xtics Limit 0,0 Nominal Rotated -45 Offset Character 0, 0, 0 Auto Adjust xtics norangelimit Font ", 8" set xtics () The title of the title "US immigration from North Europe \" playlist selected histogram as "I = 22 set shabber [0: 2000] set xaryange [1: 2] set style line 1 lc rgb 'orange'; Plot line 2 lc rgb 'pink' for plot [i = 2: 7] using 'data.dat' i: xtic (1) ti columnhead (i> 3 to 10: i)% i ls 2 + 1 Fieldist Solid noborder, using \ 'newhistogram-1', '2' ti 'total' liter -1 fillese empty, use 3 'notitle liter-1 filastyle Li, the use of the 'Women' 4 titles, using '' Litter-1 Filly Pattern 5, '5' notitle liters - 1 Fastest Pattern 5, 6 'Men' LT-1 Fastest Pattern 6, '' Using 7 Notitile LT-1 Fastest Pattern 6 Set Output System ('pdftext histogram. TTX ') results with 4.6.5:
Just found out, that you specify a background color pattern such as
... fillstyle pattern The terminal which works for 6 transparent depends on the gnuplot version:
plot x frecruvs x1 fastest solid concrete fc rgb '# 990000' , \ X filling load x1 foxtail pattern 4 Transparent LC RGB 'white' (with SVG terminal and version 4.6.5):
Comments
Post a Comment