f



coloring histogram or boxes *with errors*

the histogram examples are amazing ; however, i cannot see how to
incorporate error bars into those examples, and i cannot see how to
simply color my histogram bars differently.   it looks like i have to
rewrite my data and script from scratch, but i am bewildered by the
possibilites - newhistogram, boxes, xtics,... i don't know where to
start. in particular, i want to use the 'awk<' trick and keep the
labels as implemented in the example i have :

data file "example.dat":
1  0 0 2.8673 0.2047 experiment1
2  0 0 2.2550 0.6326 experiment2
3  0 0 1.0238 1.2356 experiment3
4  0 0 1.5366 0.9208 experiment4

gnuplot commands :
reset ; set xrange [0:5] ;  \
set xtics 1 ; set grid ; \
set key left top ; unset label ; \
set xlabel "experiment" ; set ylabel "average +/- sigma " ; \
set style fill solid border -1 ; \
set style data histogram ; \
set xtics nomirror rotate by -25 ( \
"experiment1" 1, \
"experiment2" 2, \
"experiment3" 3, \
"experiment4" 4 ) ; \
plot \
"< awk '{print $1, $4, $5}' example.dat" w boxerror notitle lw 2 lt 1
0
bryan
6/15/2010 6:36:22 PM
comp.graphics.apps.gnuplot 5008 articles. 0 followers. Post Follow

2 Replies
776 Views

Similar Articles

[PageSpeed] 46

On Jun 15, 8:36=A0pm, bryan <bryanlep...@gmail.com> wrote:
> the histogram examples are amazing ; however, i cannot see how to
> incorporate error bars into those examples, and i cannot see how to
> simply color my histogram bars differently. =A0 it looks like i have to
> rewrite my data and script from scratch, but i am bewildered by the
> possibilites - newhistogram, boxes, xtics,... i don't know where to
> start. in particular, i want to use the 'awk<' trick and keep the
> labels as implemented in the example i have :
>
> data file "example.dat":
> 1 =A00 0 2.8673 0.2047 experiment1
> 2 =A00 0 2.2550 0.6326 experiment2
> 3 =A00 0 1.0238 1.2356 experiment3
> 4 =A00 0 1.5366 0.9208 experiment4
>
> gnuplot commands :
> reset ; set xrange [0:5] ; =A0\
> set xtics 1 ; set grid ; \
> set key left top ; unset label ; \
> set xlabel "experiment" ; set ylabel "average +/- sigma " ; \
> set style fill solid border -1 ; \
> set style data histogram ; \
> set xtics nomirror rotate by -25 ( \
> "experiment1" 1, \
> "experiment2" 2, \
> "experiment3" 3, \
> "experiment4" 4 ) ; \
> plot \
> "< awk '{print $1, $4, $5}' example.dat" w boxerror notitle lw 2 lt 1

In this example both the "awk trick" and the explicit xtic setup are
unnecessary. There is also little point in chaining all the commands
into one line with the backslashes (unless you want to use that line
as a command line argument to -e).

It is better to select the columns you want to use with the 'plot ...
using' mechanism, this is more efficient and also more portable (works
on systems that don't have awk). For the labeled xtics there is the
xticlabel function.

reset
set xrange [0:5]
set xtics 1
set grid
set key left top
 unset label
set xlabel "experiment" ; set ylabel "average +/- sigma "
set style fill solid border -1
set xtics nomirror rotate by -25

plot 'example.dat' u 1:4:5:xticlabel(6) w boxerror notitle lw 2

So far this is equivalent to your example. Now you want each box to be
colored differently.
This is possible with some of the new features of version 4.4:

plot for [i=3D0:3] 'example.dat' u 1:4:5:xticlabel(6) every ::i w
boxerror notitle lw 2

Finally, here is a variant that allows you to define arbitrary RGB
colors:

colors =3D "#226699 #aa5544 #9911bb #ccdd44"
plot for [i=3D0:3] 'example.dat' u 1:4:5:xticlabel(6) every ::i w
boxerror notitle lw 2 lc rgb word(colors,i+1)

It is also possible to define line styles, like

set style line 10 lw 2 lc rgb "pink"
set style line 11 lw 2 lc rgb "light-blue"
set style line 12 lw 2 lc rgb "brown"
set style line 13 lw 2 lc rgb "dark-green"

plot for [i=3D0:3] 'example.dat' u 1:4:5:xticlabel(6) every ::i w
boxerror notitle ls i+10

Also see 'help colorspec'.

Hope this helps.

P=E9ter Juh=E1sz
0
ISO
6/15/2010 10:35:07 PM
P=E9ter, that helped a lot, thanks - lots to check out here (was using
4.2).

-bryan
0
bryan
6/16/2010 2:59:53 AM
Reply:

Similar Artilces:

histogram error bar color
what is the keyword for how the errorbars get colored in a histogram? -Bryan bryan wrote: > what is the keyword for how the errorbars get colored in a histogram? They get the same color as the border of the fill style. So set style fill solid 1.0 border 3 set style histogram errorbars lw 2 should get you solid-fill histograms with thick errorbars colored as linetype 3. > > -Bryan ...

Creating a color box graphic in DOS
Hey, Does anyone know how to create a color box graphic in DOS? What .h files should I include? I've got to do it for a DOS console program (not a Windows-based program). Thanks! On Feb 12, 12:02=A0am, boston_dude <ian.gan...@gmail.com> wrote: > Hey, > > Does anyone know how to create a color box graphic in DOS? =A0What .h > files should I include? =A0I've got to do it for a DOS console program > (not a Windows-based program). > > Thanks! YFGI? http://en.wikipedia.org/wiki/ANSI_escape_code On Feb 11, 5:28=A0pm, =D6=F6 Tiib <oot...@hot.ee> wrote: ...

histogram errorbars every box with defined color
Hi I have the following code: (See question at the end!) ********************************************** clear reset unset key set auto x blue =3D 0x0000ff # RGB components for pure blue cyan =3D 0x00ff00 # RGB components for cyan red =3D 0xff0000 # RGB components for red set xtics rotate by 90 offset -1.5,-5 set bars fullwidth set style fill solid 1 border lt -1 set style data histograms set style histogram errorbars gap 1 lw 1 set title "Intensity of luxA signal for different substances" set output 'luxA.png' set terminal png transparent nocrop enhanced font times 18 size 1024,768=20 set ylabel "luminescence intensity" set grid ytics noxtics set xtics scale 0 plot 'luxA.dat' using 2:4:xticlabels(1) ********************************************** and the following data: ********************************************** Name Value Color Deviation "SN wt" 1103 1 61.0y "SN =CE=94=CE=94" 124.3333333333 1 3.21 "SN -CI" 367.3333333333 1 25.38 "SN -B" 147.3333333333 1 20.74 "10nM C8" 325.6666666667 2 20.13 "200nM C8" 207.3333333333 2 28.7 "300nM C8" 236.6666666667 2 35.91 "1uM BDSF" 596.6666666667 2 44.12 "10uM BDSF" 545.3333333333 2 102.01 "15uM BDSF" 547 2 33.60 "1uM DSF" 596.3333333333 2 98.47 "10uM DSF" 532 2 21 "15uM DSF" 653.6666666667...

numbers within boxes of rowstacked histograms in gnuplot?
I have written a Perl script that generates scripts (example please see [1] below) for Gnuplot and corresponding tables ([2] below), then runs Gnuplot to produce histograms. The histograms are rowstacked, and the values are all scaled to 100%. The graphical output of this example looks like this: http://genomics.iab.keio.ac.jp/pics/example.png However, I want to see the actual numbers, which contribute to each box in each column, to see them within the boxes. The following picture is a mock-up to make clearer how I want to the output to look in principle: http://genomics.iab.keio.ac.j...

Error Colors for "Mouse hover" box
Somehow my 'mouse hover' box is white with white text. For the lack of a better term, the mouse hover box is the box that pops up when you hover your mouse over an error or warning that is underlined in a script. For example, the graphic interface will underline an unbalanced parenthesis error like 'temp = zeros(1,1'. When I hover my mouse over the red line, the box is unreadable. I would post a pic, but I cannot. Anyway, can anyone tell me how to fix this? I am using Ubuntu 14.04. I could not find the option in the preferences -> color options. I tried removing my prefe...

Plotting color graphics with a color bar
I've been using 'image' to plot 2d data, but have run in to problems when adding a color bar. The data is in the range from 0 to 3nm, and a colorbar fitted to this has only four shades. I can scale the data so it's 0 to 255, which gives a lovely image, but then the color bar is also from 0 to 255. I can't see how to add a different scale to the colour bar. Some plot functions use color as another axes, and by scaling this axes the color bar scales as well. However, I don't think 'image' can in this way. Is it better to use another plotting function than image? I need to maintain the aspect ratio of the plot, as it represents physical sizes. I want to keep a flat 2d image (for now), although later will need to plot the third variable as 3d height as well as color. Thanks for any help, Richard. I think "imagesc" is the command you are looking for. Richard Cobley wrote: > > > I've been using 'image' to plot 2d data, but have run in to > problems > when adding a color bar. The data is in the range from 0 to 3nm, > and > a colorbar fitted to this has only four shades. I can scale the > data > so it's 0 to 255, which gives a lovely image, but then the color > bar > is also from 0 to 255. I can't see how to add a different scale to > the colour bar. Some plot functions use color as another axes, and > by scaling this axes the color bar scales as well. However, I > don't &...

Color control, selection box, individual color
Hello everybody,<br><br>I have a problem when choosing a color with a color= control.<br>After choosing "more colors" and select an individual color fr= om that color selection window, Labview doesn't go back to my application w= indow. Instead I get back to the Windows Desktop and have to go back (by Ta= b or click the toolbar) to my Labview program. This seems to be independent= of my application, I get this behaviour with development versions and exec= utables, with windows with menu/scrollbar etc. enabled or disabled.<br>This= only happens when I ch...

How to handle the color for graphics for two-color printing?
Newbie question. The publication needs two colors, red for titles and green for texts. I also placed a few cliparts that I created with Illustrator in the article. Each clipart should be either red or green too. What I did is I colored the cliparts in green and red in Illustrator and saved them as EPS files. Then placed them in the article. When I tried the plug-in, save for service provider, it says it will be 4-color printing. I suspect the color that I used for EPS files in Illustrator may not be the exact green and red for the titles and texts. Am I right? If so, how to correct th...

xdvi foreground and background colors that changes graphics colors
Hi! I am using LaTeX to create slides for a presentation (using FoilTeX), and I have a problem with colors and included graphics. The simple way I use to change the background color and text color is with the -bg and -fg options of xdvi (the version of xdvi available here (22.40) doesn't render colors), but it turns out that any black and white pixels in images are also changed to the new background and foreground colors! Is there anything I can do other than editing the images such that black and white pixels won't be black and white but almost black and almost white? -- F....

Runtime error 3265 error and filling combo boxes
I'm trying to set up a pair of combo boxes so that you may select from the first to load a specific list into the second combo box. The code of the class module for this part is: Public Sub editBookFillItems() If frmEditBook.cboMedia.Text = "" Then ElseIf frmEditBook.cboMedia.Text = "Book" Then frmEditBook.cboSelectTitle.clear frmEditBook.cboSelectTitle.Enabled = True rs.Open "Book", conn, adOpenStatic, adLockOptimistic, adCmdTable With rs Do Until .EOF frmEditBook.cboSelectTitl...

Can a Color Box display the transparent color [16777216]?
I was trying to force a Color Box to display the transparent color [16777216 = "2 to the 24th"], but I didn't have much luck.<br><br>Instead of displaying transparent, the Color Box wanted to paint a replica of the coloring tool's "transparent" icon, which is a small "T" on a white background.<br><br>Is it possible to make a Color Box display the transparent color?<br><br>[See attached VI.] Transparent Color Box.vi: http://forums.ni.com/attachments/ni/170/101194/1/Transparent Color Box.vi I do not think you can.<br...

Hovsepian: Apps! Apps! Apps!
Novell CEO: Apps Are Job No. 1 for Linux http://www.cio-today.com/story.xhtml?story_id=021001VE8HV3 <<< In order for Linux to grow into the computing mainstream, the open- source OS needs more applications and a standardized approach to software certification, Novell CEO Ron Hovsepian said in his keynote Wednesday at the LinuxWorld conference and trade show in San Francisco. "The No. 1 thing that we need on Linux is applications," he said. "Whether we like it or not, the application is what drives the final customer decision," he added. >>> John Bail...

histogram of histograms
Hi I have several text files that look like this: Brazil, 10 Brazil, 13 Brazil, 9 Bulgaria, 1 Canada, 48 Canada, 52 Canada, 38 Canada, 55 Canada, 59 Chile, 1 Chile, 1 Chile, 2 China, 7 China, 18 China, 19 China, 22 China, 25 I need to iterate through the above file(s) and get the data summarized in the form: Canada, 252 China, 91 Chile, 4 Brazil, 32 Bulgaria, 1 I know how to go from a single column list with multiple repeated values to a 'histogram' type list, ie: my_hash = countries.inject(Hash.new { 0 }) { |counts, key| counts[key] += 1; counts} my_hash = my_hash.sort { |a,b| a...

Color box
I need to make a simple filled black box behind my text. I want the box to stretch over the entire page and not only the text. The \makebox command was fine, but that box covered the text only. "Mikael �gren" <mikael.agren@home.se> writes: > I need to make a simple filled black box behind my text. I want the box to > stretch over the entire page and not only the text. The \makebox command was > fine, but that box covered the text only. No box, just a background color. Lots of answers: Use google/grouos to search for "page background color group:comp.text.tex...

When is an error not an error?
The Java language specification claims in: 8.8.7.1 Explicit Constructor Invocations .... "If an anonymous class instance creation expression appears within an explicit constructor invocation statement, then the anonymous class may not refer to any of the enclosing instances of the class whose constructor is being invoked." Helpfully it gives an example: "For example: class Top { int x; class Dummy { Dummy(Object o) {} } class Inside extends Dummy { Inside() { super(new Object() { int r = x; }); // err...

Colors on histograms
Hi, I make trials with the examples for stacked histograms from gnuplot.org. But I didn't found a possibility to determine the color of the boxes. If I use .... plot 'immigration.dat' using 1:xtic(1) w boxes 7 ... then I get this color but the box will have the full width form the line .... set boxwidth 0.75 relative ... Whats wrong? Thanks, Thomas In article <4e4ttiF1d8gmnU1@individual.net>, =?ISO-8859-15?Q?Jan-Thomas_K=FChnert?= <jthkue@web.de> wrote: >Hi, > >I make trials with the examples for stacked histograms from gnuplot.org. >...

hide the input box or change the color of input box in html
i want to hide the input box or change the color of input box in html so that it can't be visible . please tell me how? ashutosh wrote: > i want to hide the input box or change the color of input box in html > so that it can't be visible . > please tell me how? That's really a Javascript/HTML/CSS question, so you'd probably be better off asking in a different newsgroup, but... http://www.jguru.com/faq/view.jsp?EID=336107 On 16 Jun 2005 06:36:16 -0700, ashutosh wrote: > i want to .. So you mentioned on the other group. Please do not multi-post. <http:/...

hide the input box or change the color of input box in html
i want to hide the input box or change the color of input box so that it can't be visible . please tell me how? On 16 Jun 2005 06:34:44 -0700, ashutosh wrote: > Re: hide the input box or change the color of input box in html This is not a java question. Changing the rendering of HTML elements comes down to either the HTML istelf, or the styles applied to the HTML. For the former, see c.i.w.a.h.[1], for the latter - c.i.w.a.s.[2] [1] <http://groups-beta.google.com/group/comp.infosystems.www.authoring.html> [2] <http://groups-beta.google.com/group/comp.infosystems.www...

Colorful Histogram
In the following image, a colorful bar graph is created. Does anyone know how to create a colorful histogram like that? Please paste the code. Thank you. <http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/bar-colorheights3.gif> "Histogram" <Histogram@matlab.com> wrote in message news:ef556eb.-1@webcrossing.raydaftYaTP... > In the following image, a colorful bar graph is created. Does anyone > know how to create a colorful histogram like that? Please paste the > code. Thank you. > > <http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/bar-colorheights3.gif> Did you try running the code (starting with step 1 in the section that includes that picture) on that documentation page? http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/creating_plots/f10-19972.html -- Steve Lord slord@mathworks.com Yes, but the code doesn't seem to work for histogram. Maybe that's just because I'm dumb. Steven Lord wrote: > > > > "Histogram" <Histogram@matlab.com> wrote in message > news:ef556eb.-1@webcrossing.raydaftYaTP... >> In the following image, a colorful bar graph is created. Does > anyone >> know how to create a colorful histogram like that? Please paste > the >> code. Thank you. >> >> <http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/bar-colorheights3.gif&...

Colors in Histogram
Hi, how can I set the color of the bars in a Histogram? Thanks. Look at the Options Needs["Histograms`"]; Options[Histogram] Histogram[ RandomReal[NormalDistribution[0, 1], {1000}], BarStyle -> LightRed] Bob Hanlon ---- Joerg Schaber <schaber@molgen.mpg.de> wrote: ============= Hi, how can I set the color of the bars in a Histogram? Thanks. Hi, << BarCharts` lst = Partition[Table[RandomInteger[{0, 255}], {9}], 3]; BarChart[lst, BarStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[0, 0, 1]}] ...

color of histogram
Hi I wonder how I can change the color of the histogram to be transparent with red edge color. [ n, ctrs ] = hist( log(SaCap_g ) ); or bar( ctrs, pdfheight, 'hist' ); Paul > I wonder how I can change the color of the histogram to be > transparent with red edge color. Paul, you can call hist and bar to get a handle to the histogram, then set its various properties as follows: load carsmall [n,x] = hist(MPG); h = bar(x,n,'hist'); set(h,'facecolor',[.8 .8 .8], 'edgecolor','r', 'facealpha',.3) You can also type "get(h)" to see ...

Coloring Histograms
I'm using the Histogram package, calling it by: Needs["Histograms`"] Each histogram keeps coming out in pale blue. I'd like to be able to change the color of an individual histogram to something else. This way when I combine two histograms on the same graph using "Show" they will come out in different colors. To plot a single histogram I use the syntax: Histogram[completeness, FrequencyData -> True] I haven't found a plot option that will acomplish this. Any ideas would be appreciated. Richard On 11/21/08 at...

histogram error
INGRES REPORT Copyright (c) 1981, 1998 Computer Associates Intl, Inc. Reading report specifications and preparing query . . . E_OP03A2 consistency check - histogram on mat_monthly attribute monthly_cb_qty is not monotonically increasing (Mon Jan 5 16:46:25 2004) E_RW1019 Either you had errors in the .QUERY command, or you didn't specify either a .QUERY or .DATA command. Processing stops. E_RW100A 1 error(s) have occurred in setting up the report. No report will be written. Correct errors and rerun. what would be the possible error as query is running fine through isql , pl help AJAY CHADHA ENGINEER (IT) IT DEPARTMENT ,NTPC TTPS ------------------------------------------------------------------------------ "Speed & Quality is essence of IT" At 4:28 PM +0500 1/5/04, <ajay_chadha@ttps.ntpc.co.in> wrote: >INGRES REPORT Copyright (c) 1981, 1998 Computer Associates Intl, Inc. >Reading report specifications and preparing query . . . >E_OP03A2 consistency check > - histogram on mat_monthly attribute monthly_cb_qty is not >monotonically > increasing > (Mon Jan 5 16:46:25 2004) > Drop and re-create the statistics on that column. What version, patch level, platform? This problem used to occur occasionally with dates, but as far as I know it's been fixed for quite some time. Karl Dear Sir, I see your company motto is "Speed & Qua...

histogram error
Hi, I am reading in a tif image file, and get the histogram of the image. However, getting the following error messages: Can anyone help me here? thanks song >> a = imread('song.tif'); >> figure, imhist(a); ??? Error using ==> iptcheckinput Function IMHIST expected its first input, I or X, to be two-dimensional. Error in ==> imhist>parse_inputs at 270 iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'}, ... Error in ==> imhist at 57 [a, n, isScaled, top, map] = parse_inputs(varargin{:}...

Web resources about - coloring histogram or boxes *with errors* - comp.graphics.apps.gnuplot

Image histogram - Wikipedia, the free encyclopedia
... light and pure white areas. The vertical axis represents the size of the area that is captured in each one of these zones. Thus, the histogram ...

3D Photo Ring Lite - Picture Viewer to organize and sort photos by similar color histograms (research ...
Get 3D Photo Ring Lite - Picture Viewer to organize and sort photos by similar color histograms (research at Klagenfurt University, Austria) ...

CEO Compensation Histogram Chart - Business Insider
A histogram chart based on data from a Wall Street Journal study showing the distribution of CEO compensation

A Robust Histogram for Massive Parallelism
Preserving highly parallel performance when every thread is simultaneously trying to increment a single object

What the Histogram on Your Camera Actually Tells You
You've almost certainly seen a histogram on your camera's display at some point, but if you don't take photography particularly seriously you ...

An Explanation of What a Camera Histogram Graph is and How It Can Help You Take Better Photos
... course for CreativeLive , photographer John Greengo gives a simple explanation of that color graph on your camera’s display known as a histogram ...

How to Use the Image Histogram in iPhoto
... and plotting data. Perhaps you never quite understood why you needed to learn this. Until now! Sandro Cuccia shows you how a photo's Histogram ...

Post-Debate Bounce Histogram
Post-Debate Bounce Histogram

Restaurant histograms of the day
I have a column at Grub Street today looking at some check-by-check level data for five New York restaurants.

Dragons on the far side of the histogram
... other 499 guests have that problem… just deal with it”. You wouldn’t come back next Summer. So do have a look at the far side of your histogram. ...

Resources last updated: 3/2/2016 9:16:41 AM