How to plot a series of randomly generated 1, -1 data in Sierpinski Triangle - binary

I have data sets having values of 1, -1 for 6374 entries, could you explain me how to plot data set in Sierpinski Triangle format as I trying to view patterns
data Sets Example
Sample output
Thank You

Related

GnuPlot :: Plotting 3D recorded in an unconventional format

I would like to prepare a script file to draw a 3D plot of some kinetic spectroscopy results. In the experiment the absorption spectrum of a solution is measured sequentially at increasing times from t0 to tf with a constant increase in time Δt.
The plot will show the variation of absorbamce (Z) with wavelength and time.
The data are recorded using a UV-VIS spectrometer and saved as a CSV text file.
The file contains a table in which the first column are the wavelengths of the spectra. Afterwards, a column is added for each the measured spectra, and a number of columns depends on the total time and the time interval between measuerments. The time for each spectra appears in the headers line.
I wonder if the data can be plotted directly witha minimum of preformatting and without the need to rewrite the data in a more estandar XYZ format.
The structure of the data file is something like this
Title; espectroscopia UV-Vis
Comment;
Date; 23/10/2018 16:41:12
Operator; laboratorios
System Name; Undefined
Wavelength (nm); 0 Min; 0,1 Min; 0,2 Min; 0,3 Min; ... 28,5 Min
400,5551; 1,491613E-03; 1,810312E-03; 2,01891E-03; ... 4,755786E-03
... ... ... ... ... ...
799,2119; -5,509266E-04; 3,26314E-04; -4,319865E-04; ... -5,087912E-04
(EOF)
A copy of a sample data is included in this file kinetic_spectroscopy.csv.
Thanks.
Your data is in an acceptable form for gnuplot, but persuading the program to plot this as one line per wavelength rather than a gridded surface is more difficult. First let's establish that the file can be read and plotted. The following commands should read in the x/y coordinates (x = first row, y = first column) and the z values to construct a surface.
DATA = 'espectros cinetica.csv'
set datafile separator ';' # csv file with semicolon
# Your data uses , as a decimal point.
set decimal locale # The program can handle this if your locale is correct.
show decimal # confirm this by inspecting the output from "show".
set title DATA
set ylabel "Wavelength"
set xlabel "Time (min)"
set xyplane 0
set style data lines
splot DATA matrix nonuniform using 1:2:3 lc palette
This actually looks OK with your data. For a smaller number of scans it is probably not what you would want. In order to plot separate lines, one per scan, we could break this up into a sequence of line plots rather than a single surface plot:
DATA = 'espectros cinetica.csv'
set datafile separator ";"
set decimal locale
unset key
set title DATA
set style data lines
set ylabel "Wavelength"
set xlabel "Time (min)"
set xtics offset 0,-1 # move labels away from axis
splot for [row=0:*] DATA matrix nonuniform every :::row::row using 1:2:3
This is what I get for the first 100 rows of your data file. The row data is colored sequentially by gnuplot linetypes. Other coloring schemes are possible.

Plot csv file with multiple rows using gnuplot

I have a csv file which contains 500 rows and 100 columns.
I want to plot the data in the way that:
Each row represent a curve on the graph. Every column represents a
value on the curve (100 values).
500 such curves on the graph.
The code:
set xrange [0:100]
set yrange [0:20]
set term png
set output 'output.png'
set datafile separator ','
plot 'myplot.csv'
But this does not seem to work.
How can I configue gnuplot to achieve that?
Edit:
The data is in this format (Shortened):
7.898632397,7.834565295,8.114238484,7.636553599,7.759415909,7.829112422
7.898632397,8.379427648,8.418542273,7.921914453,7.558814684,7.237529826
7.898632397,7.862492565,8.132579657,8.419279034,8.350564183,8.578430051
7.898632397,7.613394134,7.213820144,7.42985323,7.74212712,7.144952258
7.898632397,7.736819889,8.14247944,8.025533212,8.256498438,8.133741173
7.898632397,7.906868959,8.032605101,8.308540463,8.238641673,8.143985756
set datafile separator comma
plot for [row=0:*] 'myplot.csv' matrix every :::row::row with lines
However I suspect that with 500 lines the plot will be too crowded to interpret.

Box n whisker from CSV with octave

I'm totally new to Octave but thought I'd give it a try since I need to create a box and whisker plot from a raster image with height values.
I've managed to export my GeoTIFF image to some sort of .CSV-file, it can be accessed from here and it uses "." for decimals and ";" as the delimiter between cells.
When I run dlmread ("test.csv",, ";", 0, 0) the results indicate that the data is split up in multiple columns? And on top of that I have zero-values (0) which isn't present in test.csv, see screenshot below from Octave:
First of all I was under the impression that to create a box and whisker plot I needed to have the data in one column, not a couple of hundred like in this case. And secondly; what am I doing wrong when I'm getting all these zeroes?
Could someone point out how to properly import the above CSV to octave. And if you feel really generous I would be so thankful if you also could help me to create a box and whisker plot from the attached data.
I'm using Octave 4.2.1 x86_64 on Windows 10 home.
It's really difficult to figure out what you really want and it might be much easier to use the GeoTIFF directly without needing to go through multiple (yet obscure) conversions.
But here is a wild guess:
pkg load statistics
s = urlread ("https://drive.google.com/uc?export=download&id=1RzJ-EO0OXgfMmMRG8wiCBz-51RcwSM5h");
o = str2double (strsplit (s, ";"));
o(isnan (o)) = [];
subplot (3, 1, 1);
plot (o)
grid on
subplot (3, 1, 2);
hist (o, 100);
subplot (3, 1, 3);
boxplot (o)
print out.png
gives you the raw data, the histogram and a boxplot with center, spread, departure from symmetry and whiskers:

How to use Gnuplot to create histogram from binned data from CSV file?

I have a CSV file which is generated by a process that outputs the data in pre-defined bins (say from -100 to +100 in steps of 10). So, each line looks somewhat like this:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
i.e. 20 comma separated values, the first representing the frequency in the range -100 to -90, while the last represents the frequency between 90 to 100.
The problem is, Gnuplot seems to require the raw data for it to be able to generate a histogram, whereas I have only the frequency distribution. How do I proceed in this case? I'm looking for the simplest possible histogram, that perhaps displays the data using vertical bars.
You already have histogram data, so you mustn't use "set histogram".
Generate the x-values from the linenumbers, and do a simple boxplot
plot dataf using (($0-10)*10):$1 with boxes

dygraph, bypass csv file x-axis and create own x-axis value

I generate a csv file with data:
0.86, -18.55, -28.14
-0.85, -17.81, -28.70
-1.29, -17.81, -28.70
-1.71, -16.61, -28.70
and so on.
Now i do not want dyGraph to use the first colum as the x-axis in the graph.
I want dygraph to generate a number for me starting at 0.
So the x-axis would be 0, 1, 2, 3 etc
The data in the file would be only y-axis values.
Is this posible?
I searched the documentation/forum, but can't find it.
Regards,
Robertho
dygraphs expects the first column to be x values. If you want your x-axis to be 0, 1, 2, etc., then you'll need to add a first column with those values.