in Gnuplot, how to set the origin point still using 0 except using costume format like 0x10^0? - gnuplot

I am googling this problem but not sure whether I am using the right key words to describe the problem.
The problem is this:
I want to plot the x-ticks with the format 1.0 x 10^6 and some thing like that, so I use the following code:
set format x "%1.1t {/Symbol \264} 10^{%T}"
And the result is like this:
The code works pretty fine except at origin point, which I want it still keeps 0 there, because you can see that 0x10^0 is still 0.
So is there anything I can do to solve this problem, or any web page or documents help solve this problem?
To be more specific, I want the plot look like this:
Thank you!

With the help of MichaelO. and Christoph, I solved the problem.
In Gnuplot, just using
set xtics add('0.0' 0
can overwrite the original one with the new format of tics.
Here is the reference:
excluding a tic number in scientific format

Related

Convert a scanned plot to a digital one

Let's say that i have a scanned document and somehow i have managed to clear it from grid lines, extra character and the output is something like this.
I wanna convert it to digital format and plot it with matplotlib lets say.
How should i proceed on that? Any suggestions ?
I have tried to flatten the image and then plot it but the output was not even close.

Italicize and color legend manually for different graphs using same labels and colors

I am trying to create multiple graphs that share the same legend.
I have found many ways to combine multiple graphs and it seems that ggarrange has the ability to create one shared legend for all that is supposed to be unique.
However I am having some problems when graphing since a few of the graphs do not have the same phyla (what defines the legend colors) present, but I would like them all to be the same colors throughout all of the graphs so the combined legend will have the correct colors.
For just one graph I would assign a color to the label manually like below
labs<-c("Arthropoda"="#FF66CC"
,"Cercozoa"="#FF6000")
and plot with the addition of scale_fill_manual(values=labs) and this seems to work
then I modified it so I could have portions of them italicized.
labsPhylum <-c('expression(paste(italic("Arthropoda")))'="#CC0000"
,'expression(paste(italic("Cercozoa")))'= "#FF6000"
,'expression (paste("unknown", ~italic("Eukaryota")))'= "#990000")`
However when I create a plot using ggplot and scale_color_manual() using the labsPhylum that I think should be italicized and colored I plot an empty graph with this warning so there is something vital I am not understanding here.
ggplot(data=sigtab_dil, aes(x=Species, y=log2FoldChange, color=Phylum))+
geom_point(size=2) +
scale_color_manual(values=labsPhylum)
Warning message:
Removed 9 rows containing missing values (geom_point).
Could someone please help me figure out where I am going wrong?
Thank you
Answered my own question
I realized I had to make separate vectors for breaks, labels, and values rather than combining them.
In short
colsPhylum <-c("Arthropoda"="#CC0000"
,"Cercozoa"= "#FF6000"
,"Chlorophyta"= "#CC9900"
labsPhylum <-c(expression(paste(italic("Arthropoda")))
,expression(paste(italic("Cercozoa")))
,expression(paste(italic("Chlorophyta ")))
breaksPhylum <-c("Arthropoda", "Cercozoa","Chlorophyta", "Choanozoa"
,"Ciliophora"
,"Cryptista"

Python Seaborn: How to add mean into boxplot visualization?

I was able to visualize my data in a boxplot using Seaborn.
sns.boxplot( x=df['Score'].astype('float'), y=df['Group'] )
The visualization shows me: all four quartiles, lower and upper whisker, and some outliers. How can I also add the Mean line into the boxplots? See current visualization (without mean).
Thanks!
I just figured it out. The code works like this:
sns.boxplot(x=df['Score'].astype('float'), y=df['Group'],showmeans=True )

Improving gnuplot 3d plots from data files with pm3d

I'm trying to graph an approximate solution (finite element method) to the Navier-Stokes equation. I've got a file called plotNSu1 that looks like this:
6 1 4.21022e-34
5.95 1 8.15227e-34
5.9693 0.970854 0.055197
6 1 4.21022e-34
5.9693 0.970854 0.055197
6 0.95 0.0941333
6 1 4.21022e-34
5.9693 0.970854 0.055197
5.92625 0.951192 0.0915468
5.9693 0.970854 0.055197
5.95 1 8.15227e-34
5.92625 0.951192 0.0915468
...
(The entries are x y z, grouped so that there's a blank line between each set of 4 points).
I use the following command to plot:
splot "plotNSu1" with lines
Butt I would like to make it look nicer, easier to read. (There's a small dip at one spot that's difficult to see, but is an important part of the solution).
I've found lots of examples using pm3d interpolate, but none seem to work for me. I've tried set style pm3d, and other set style commands, I've tried set pm3d map interpolate 10,10, and splot "plotNSu1" with pm3d, as well as so many other similar things stolen from the examples I've found that I can't keep track. Most of the time I just get an empty window with the color key and no plot, and often it sends me an empty 2d window.
I would like to have the color change with the contour of the plot, to make the little dip easier to see. Does anyone know how to do this? Here's one of the websites I've been trying to use, to see what I'm aiming for: http://gnuplot.sourceforge.net/demo/pm3d.html
I tried to post the image, but as I do not have enough reputation, I can't. But it's difficult to see what's going on because the graph is just all red.
I found a way to make this work, more or less, thanks to #Christoph's help and this other question suggested by stackoverflow: gnuplot pm3d plot triangle data
With my data in the file described above, in gnuplot I type:
set dgrid3d
set pm3d corners2color c2
splot "plotNSu1" using 1:2:3 with pm3d
The result isn't perfect, it looks a little choppy, but it basically does what I wanted, I can see the "dip" in my graph much better now.

Setting labels for rowstacked histgram bars

anybody able to tell me how to add labels to gnuplot rowstacked histogram? I want to add a label to one specific read column.
Data looks like this:
Date, Online_Percent, Offline_percent, Maintance_percent
01.01.2013, 96.000, 2.000, 2,000
i would like to add another column with "offline_time" and label the bar with it (on top or right into the bar, i don't care about that)
Hope anybody can help me.
Thanks
Thanks for trying to help me, but found a solution on an asian site.
Solution :
'' using 0:($2+50):3 with labels notitle
#Explanation:
0=x-index
($2+50)=y-index
3=Value from data to be used as label....
You are also able to apply the style settings like this:
'' using 0:(\$2-10):2 with labels notitle "'font "1" rotate by -90'
Hope it will help others having this question.

Resources