Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8998705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:04:20+00:00 2026-06-16T00:04:20+00:00

I’m trying to present data in a boxplot with a few additions. On top

  • 0

I’m trying to present data in a boxplot with a few additions.
On top of the boxplot, i want to also print all the data points, since there aren’t that many.
There will be many boxplots side by side, and the data points will correspond, so each data point in one plot will be represented in another boxplot, however their order can change. That’s why I want to color the points.
I got this so far:

plot    data using (1):($1) with boxplot,\
            data using (1):($1) with points lc variable
            [more plots...]

This needs an extra column in each datafile, that specifies the linecolor. Which works fine, if I had such a column, or if I could care to add it.

Is there another way to iterate through the linestyles (or colors), so it plots the first point with style 1, the second with style 2 etc.?

It seems like a real easy problem, that’s either solved by some command I can’t seem to find, or maybe by taking the linestyles from a different file, which would be the same for all plots (if that works in gnuplot).

Furthermore, I’d like to know if the boxplot command has the additional feature of being able to plot the average as well (or do I absolutely need the stats command from gnuplot 4.6, or some kind of hack).

Sometimes it’s just nice to be able to simply add the average in a boxplot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:04:20+00:00Added an answer on June 16, 2026 at 12:04 am

    Is there another way to iterate through the linestyles (or colors), so it plots the first point with style 1, the second with style 2 etc.?

    Yes. Gnuplot provides a number of pseudo-columns. To get more information, see

    help datafile using pseudocolumn
    

    But the gist of it is that you can use column(0) for this. I believe that iteration starts at 0 though. Since there isn’t a ls 0, you’ll need to add 1.

    plot data using (1):($1) with boxplot,\
         data using (1):($1):(column(0)+1) with points lc variable
    

    Furthermore, I’d like to know if the boxplot command has the additional feature of being able to plot the average as well (or do I absolutely need the stats command from gnuplot 4.6, or some kind of hack).

    I believe that you need either gnuplot 4.6 or some kind of hack. One such hack (which will work using gnuplot 4.4, but not earlier) could be:

    sum=0.0
    npt=0
    compute_sum_npt(x)=(npt=npt+1,sum=sum+x,NaN)
    set term unknown
    plot data u 1:(compute_sum_npt($1))
    avg=sum/npt
    
    set term ...
    set output ...
    plot data using (1):($1) with boxplot,\
         data using (1):($1):(column(0)+1) with points lc variable,\
         avg w lines ls -1
    

    If your version of gnuplot is earlier than 4.4, you’ll need to use a shell command to compute the average. Something like awk should suffice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.