seaborn unknown line on barchart - seaborn

Below in the picture their is a brown barplot and on that plot their is a dark brown small line at the end.
Its not possible to post the exact code because its many thousands of line. So my question is what parameter could be coursing this?
Thank you

You have several values corresponding to the category f which are averaged together and the bar is the 95%CI around that mean.
If you want to hide the CI, pass ci=None to barplot()

Related

How to draw x=y line in OriginPro

Does anyone know how to draw an exact x=y line in OriginPro scatter plot? I already looked into the Internet and OriginPro forums with no exact solution. Many thanks in advance.
Try this:
Firstly make a column of numbers in Excel (...,-3,-2,-1,0,1,2,3,4,5,...), copy that. Then create a new Book in Origin, paste it in 2 columns: (X) and (Y). After highlight theese 2 columns with your cursor and go to Plot -> Line. That's it.

Animating XY Line in TecPlot

I'm an environmental engineer using TecPlot to plot come charts with some input data, let me explain my problem.
I'm studying the evolution of a river bed with a Fortran code which I wrote. As a output the code gives a detailed stratigraphy going some centimeters under the soils surface. Basically the output file looks like this:
0.03500000000 -0.18093000000 -0.17093000000 -0.16093000000 -0.15093000000 ...
0.10500000000 -0.18100000000 -0.17100000000 -0.16100000000 -0.15100000000 ...
0.17500000000 -0.18107000000 -0.17107000000 -0.16107000000 -0.15107000000 ...
0.24500000000 ...
and so on.
The first column is the x variable (horizontal evolution) and has 200 data.
The other columns are the evolution on the vertical coordinate.
So basically for each line we have, starting from the second colon, an horizontal line drawn thanks to 400 values.
For example if I plot the entire first column with the entire first row what I get is just a line on the plot.
For each time step my Fortran code create an output file which gives a plot with all the substrate lines.
What I want to do, and I really don't know how to do it, is animating this plots in order to have, for each time step of the animation, the ENTIRE plot with ALL THE LINES.
What I've done in TecPlot so far is:
1) import all the output files
2) put them in the XY Line plot of TecPlot using one zone for each output file I have (file 1 -> 1:ZONE001, file 2 -> 2:ZONE001, file 3 -> 3:ZONE001 and so on)
3) trying to turn them into contour plot (no results)
3.2) trying to animate them with XY Line plot animation (too bad, it animates every single line...)
I hope that I've been enough thorough to let you helping me.
I would appreciate each contribution and I thank You for each -even short, small- answer.
Best regards
Assuming you have already loaded the file, and have multiple zones. you can animate the mappings by Animate -> Mappings.., As far as
trying to animate them with XY Line plot animation (too bad, it animates every single line...)
is concerned, you need Map Skip value more than 1, to skip the mappings (lines). The animation can be saved as video or image sequences from the same dialogue box, by pressing the small video button besides the play rewind and forward buttons enter image description here

What are the jqplot default series colors?

I'm plotting some data on a jqPlot pie chart, and would like to get at the slice colors.
I'm aware of the possibility to set the slices to colors I set myself. I want to avoid this because the default colors contrast nicely from one to the next slice. Also, the slices highlight on mouse-over, and these highlight-colors are also good looking in the whole. It seems too much work to create a whole new color-scheme and then apply it to the plot when jqPlot already has a good thing built in.
I want to get at the slice colors, because I need to give additional information on certain slices, and will do this outside the plot. Re-using the slice colors would additionally allow me to forego using a legend in the plot itself, and creating my own table with "slice color - name - additional information" which then serves both as legend and source of additional information.
Is there a source of the default colors somewhere? Or is there a way to programmatically extract them?
Ok, managed to find it by delving in the actual code, as the info in the documentation on the website of jqPlot is out of date on this.
For other people wanting to get the default colors:
jquery.jqplot.js, line 354: defaultColors: [ "#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc", "#c747a3", "#cddf54", "#FBD178", "#26B4E3", "#bd70c7"]
jquery.jqplot.js, line 355: defaultNegativeColors: [ "#498991", "#C08840", "#9F9274", "#546D61", "#646C4A", "#6F6621", "#6E3F5F", "#4F64B0", "#A89050", "#C45923", "#187399", "#945381", "#959E5C", "#C7AF7B", "#478396", "#907294"]
The highlight colors are generated automatically in the function $.jqplot.computeHighlightColors (line 3775 of jquery.jqplot.js). I haven't deduced the actual highlight colors as I don't need them for my purposes, but if anyone else is looking for them, that's where you can start from.
(Line numbers based on version 1.0.8, revision 1250.)
As far as I can tell & also according to the documentation, when the array is exhausted, the colors starts over from the beginning.
According to Gimp colorpicker, jqPlot default series colors used in this example are - clockwise from orange to blue :
#eaa228 - (#efbc67 if highlighted),
#c5b47f - (#d5c9a4 if highlighted),
#579575 - (#88b39d if highlighted),
#839557 - (#a7b388 if highlighted),
#958c12 - (#b3ad58 if highlighted),
#4bb2c5 - (#80c8d5 if highlighted).
Hope it will help you.
EDIT : Please see in this link default series colors specified by jqplot

Plot time series and image in R so that x axis labels line up perfectly

I am trying to plot a time series (a seismograph) with a corresponding spectrogram in R.
Since I would like to compare the time series with the spectrogram, the X axis labels on the time series need to line up with the X axis labels on the spectrogram. However, I'm having a lot of trouble with this. The best I've been able to do so far is use
par(mar=c(0,10,0,8))
and try to manually force the spectrogram labels to line up with the time series labels by tweaking the spectrogram margin. Of course this is only approximate and they still do not line up perfectly. Is there a way to make the axes generated by the code below match up with each other?
par(mfcol=c(2,1))
plot(seq_len(1000)*0.01, sin(2*pi*seq_len(1000)*0.01), type="l",xlab="Time",
ylab="Amplitude", main="Time Series", xlim=c(1,10))
image(seq_len(1000)*0.01,seq_len(100)*0.1,array(runif(1000000),dim=c(1000,100)),
xlab="Time", ylab="Frequency", main="Spectrogram", xlim=c(1,10))
Thanks in advance!
This seems to work:
par(mfcol=c(2,1))
plot(seq_len(1000)*0.01, sin(2*pi*seq_len(1000)*0.01), type="l", xaxs="i")
image(seq_len(1000)*0.01,seq_len(100)*0.1,array(runif(1000000),dim=c(1000,100)),
xlab="Time", ylab="Frequency", main="Spectrogram")
Just drop the xlim= arguments and use xaxs="i" in the plot() function to match the default for image().
You can either add xaxs='i' to the call to plot (this removes the extra padding so it lines up with the image plot), or you could use par('usr') after the 1st plot to see what the x limits are and use those values in the xlim call in image.
It turns out that this is way easier than it looked initially. The secret is to make a "dummy plot" and then add the image to the plot. So here's how the new, working code looks:
par(mfcol=c(2,1))
plot(seq_len(1000)*0.01, sin(2*pi*seq_len(1000)*0.01),
type="l",xlab="Time",ylab="Amplitude", main="Time Series")
plot(c(0,10), c(0,10), type="n") #Dummy plot with axis limits for our spectrogram
image(seq_len(1000)*0.01,seq_len(100)*0.1,array(runif(1000000),dim=c(1000,100)),
xlab="Time", ylab="Frequency", main="Spectrogram",add=TRUE)
Similar, but conversely, to Greg Snow's answer, you could add xaxs='r' to the call to image as follows:
par(mar=c(0,10,0,8))
par(mfcol=c(2,1))
plot(seq_len(1000)*0.01, sin(2*pi*seq_len(1000)*0.01), type="l",xlab="Time",
ylab="Amplitude", main="Time Series", xlim=c(1,10))
image(seq_len(1000)*0.01,seq_len(100)*0.1,array(runif(1000000),dim=c(1000,100)),
xlab="Time", ylab="Frequency", main="Spectrogram", xlim=c(1,10), xaxs="r")
Don't forget to save your par() setting first.
(maybe I should have put that above)

Add an Image next to a X-axis label on a JFreeChart's barchart

I have requirement for the barchart which I have created using JFreeChart libraries.
I am illustrating this using an example. Lets say:
I have plotted "John", "Mark", "Louis" and "Keith" on the X-axis (Students) and their respective marks on the Y-axis. I am using three different bars for each of the students to show their respective English, Science, and Maths marks.
Lets say, Science weigh the most, hence a student getting highest in Science would get a "Gold-Medal". Highest in "Maths" would fetch a student a "Silver", and highest in English would fetch him a "Bronze"
I want to put a small image (gold, silve or bronze) beside the label of the student who has got the highest marks in each of the subjects. A particular student (obviously) can get all the medals. Can this (or a thing similar to this) be done.
I am using JFreeChart's ChartFactory.createBarChart(...) api for this. I am able to plot the graph correctly but stuck with the above requirement.
Thank you!
You might look at one of the org.jfree.chart.annotations such as XYDataImageAnnotation, XYDrawableAnnotation or XYImageAnnotation.
It has been a long time this question was asked,
This is what I have done to achieve it.
Drawn a image at : (x,y) at each Category Entity.
Size of image : (width ,height) of CategoryLabel entity.
You can place you image accordingly around the category label.
Preview
Hope it helps.
Cheers :)

Resources