Hello I have plotted data from three different files against time series. I have used different line colours and line points. I have two questions regarding the line points.
In the plot below the frequency of the line points differ in one of the output. I could not figure out the reason for it as I used the same code for all the three outputs.
set style line1 lc rgb 83b300 lw 4 pt 4 pi500 ps2
The input files for the dark green and light green colour outputs contains the data in time steps of 0.01 seconds whereas the input file for the orange colour output contain the data in time steps of 0.02. Could it be the reason for different frequency of the line points?
Is it possible to get the line points wiht a phase shift? I mean all the line points should not be alligned in the same vertical line and there should be some phase shift. so that it will be easy to distinguish if all the three outputs fall on the same line
I think you answered your first question already, since you have a different sampling in one of the three files.
For the second part, you could sample the three files with different time steps that are not divisible by one another, then the point would not align. You could also introduce a shift doing
plot "file" using ($1+0.005):2 ...
but then the plot would not ultimately reflect the underlying data.
As a final comment, why is your y-range so large?
Related
I have a list of years from 2019-2098 that I want to be the x-axis values. The y-axis will be from 0 to 1 for probabilities. The line graph will measure the survival probability curve in relation to years. The issue is that I need a vertical line to reside on the mark for year 2042. Is there a way to do this? Everything I have found online doesn't work! The photo is what I get from doing an online example. It produces a vertical line but not in the correct spot.
You could add a separate data series that consists of (2042,0) and (2042,1).
Graph them as a scatterplot on top of your existing data. If needed, go to Change Chart Type and set the appearance to connect the two points with a line where the points don't show. Example: Scatter plot without points showing.
So, I want to keep only 1 red axis line. By default it shows or removes both of them, shows 1 line for each "row".
Don't know how to change my excel to english, sorry.
You need to use some tricks for this. Use an XY Scatter chart and plot the two lines as two series, one for the horizontal line, one for the vertical line.
Then format the axes to the desired maximum and remove all the grid lines.
If you want only specific numbers to show on the axes, remove the axis labels altogether and use data labels for data points instead.
I am on day #2 of searching the web and, while I have found plenty of hits that seem like they should work, none of them seem to apply to my particular situation.
I have an Excel chart with two series displayed. One is a sort of exponential decay curve, and one is a constant that intersects with the exponential curve, but does not continue past it (the final x-value of the orange line is estimated to make it look like it intersects the blue curve):
The raw data for the blue curve is as follows (leaving off data labels for confidentiality reasons, but x-values are on the left and y-values are on the right):
The orange line is simply set at 24 all the way across until it intersects with the blue curve.
So here's the problem I need to solve: I need to fill in all of the area below the blue curve with one color, and I need to fill in the area below the orange line with another color. Everything above the blue curve needs to be blank (transparent). Here's an illustration of what I want:
I know in order to get the coloring/shading I need to use an area chart. However, when I try to change the chart type to Area the scales of the axes change for each series and they no longer match up, and I am unable to edit the axes (can't set min, max, etc) to make them match up again. Additionally, only the area directly beneath the constant line fills in (as expected), but I am looking for a way to fill in the area between the orange line, the blue curve, and the axes:
How might one go about doing what I need to do?
If there's any other information I could provide that would be of help, please let me know and I'll be sure to add it in.
EDIT:
I can extend the orange line to follow the blue line off to the right, which may help fill in the lower area. However, when I switch to an area chart I still get the issue with mismatched axes with scale I can't edit:
Notice how the "567" point (the x-value where the orange line should intersect the blue curve) is spaced evenly between "500" and "600", rather than scaling slightly to the right of center as I would have expected.
How do I keep the spacing of one tick every 100 units on the x-axis but keep the datapoint for 567?
You could find the intersection point's coordinates (graphically or analitically), then split your data in two separate series within the same graph as follows :
Edit post comment section :
For some reason x-values are considered by default as text.
Righ click the x-axis > format > Select date on the axis
Then play with the principal and base in days/months to have the intervals you want.
Good parameters for this data :
main : 100 in days
base : in days
I would just have two identical charts : one does the blue and the other the orange then lay the orange chart on top of the blue and make it transparent ... worked a treat in the past...
I have defined a stochastic random variable (and many more but for the sake of this question, one is enough)
tau = pm.DiscreteUniform("tau", lower = 0, upper = 74)
After sampling using MCMC, when I plot the trace of tau, I get the following figure
Now my question is What do this black line and the two dotted lines denote ?
In all earlier figures that I had seen, the black line used to divide the area under histogram under 2 halves (almost) and dotted lines would also cover almost same are around the black line, so I used to think the bold line as mean value and the 2 dotted lines as 95% confidence interval (quite obviously I am wrong).
I will also like to verify my understanding about the height of the histogram.
According to me, the height of the histogram at 45 denotes the number of times, the sampler picked up the value 45, please correct me if I am wrong
The lines are the median (solid line) and the interquartile range (dotted lines). The histograms just illustrate the frequencies of the sample values.
I am trying to plot a family of curves in space using gnuplot.
I am trying to do it with for-loops. The data are in 4 columns, and every 20 rows, a new plot starts, e.g., if I do a plot using the 3 and 4 columns, on the row 21, the index in the third column starts again, and the number on the second column increases by one. This pattern repeats, and every 320 rows, the index on the first column increases by one, and all the pattern repeats itself again.
The index in the first column goes from 2.0 to 3.8 whereas the index on the second column goes from 75 to 90.
In my code I tried to set the range limits from 1.8 to 4.2 for one axis, and from 0 to 100 for the second axis.
I wrote the following code
a=0 # this variable indicates how many rows to skip
do for [j=20:38:1]{ # loop for the first column
do for [i=75:90:1]{ # loop for the second column #
splot [1.8:4.2][1:101] "dataforgnuplot" every ::a::a+19 u 1:3:4
w lines title sprintf("%3.2f %3.2f",j/10.0, i);
a=a+20;
}
}
and it generates one curve at a time, but the previous one disappears, I had a look at multiplot, and also was trying with replot, but, I still haven't found how to do that.
You should approach this differently. If you put blank lines in your input file in the right places, and plot the whole file, gnuplot will know exactly when to stop drawing one curve and start the next one.
From the gnuplot documentation:
Single blank records designate discontinuities in a plot; no line will join points separated by a blank records (if they are plotted with a line style).
Two blank records in a row indicate a break between separate data sets. See index (p. 79).
The difference between the two cases is that separate curves which are part of the same data set (one blank line) will be plotted in the same color and with a single entry in the legend. Different data sets will have different colors and separate labels.
It should be easy to change the program which outputs this data if you have control over it, to add the extra blank lines. If you don't control it, a one-or-two-line script should be able to insert the blank lines, either based on the line counts you gave, or by checking the first and second data records.