Does someone know if i could make a 3 dimensions chart but by using a regular 2D line chart such as linear chart but the 3rd axis would be represented by a gradient color onto the serie's line:
If the 3rd dimension is high with a hot color (color of the line) and if it is low with a cold color (for example).
Thank everyone for the help. Excuse my lack of knowledge, I'm beginning...
In addition:
These two graphs are made from these points:
[x y z]
1st section
[1, 2, 10]
[6, 4, 6]
2nd section
[6, 4, 6]
[10, 3, 4]
3rd section
[3, 10, 13]
[6, 4, 6]
4th section
[10, 3, 4]
[13, 13, -6]
X&Y graph and X&Z graph
Well, what I'd like to do is represent just the first graph (X&Y) and the Z coordinate represented by a gradient color kind of THIS gradient but within the lines. Instead those default colors.
Related
I am using plotly.js to plot my graph and Ive come to a problem. I am trying to plot a 2D plane in 3D graph. For example i have equation x >= 5 so the plane should be perpendicular to the x axis, i can calculate the 4 corner x,y,z coordinates easily. But dont know how to plot It using either mesh3d or surface3d.
I would think this is a bug (just posted it here). Meanwhile, a workaround is to specify the vertex vectors:
import plotly.graph_objects as go
fig = go.Figure(go.Mesh3d(x=[0,1,1,0],
y=[1,1,1,1],
z=[0,0,1,1],
opacity=0.2,
color='black',
i=[0, 0, 0, 1],
j=[1, 2, 3, 2],
k=[2, 3, 1, 3],
))
fig.show()
Disclaimer: I am new to machine learning. Please forgive me if I am asking a super dumb question.
Hi I am trying to find pattern in a set of numbers using brain.js.
I have expanded on the example in brain.js github page.
const net = new brain.recurrent.LSTMTimeStep({
inputSize: 3,
hiddenLayers: [10],
outputSize: 3
});
net.train([
[1, 1, 1],
[2, 2, 2],
[3, 3, 3],
[4, 4, 4],
[5, 5, 5],
[6, 6, 6],
[7, 7, 7],
[8, 8, 8]
]);
const output = net.run([[7, 7, 7], [8, 8, 8]]);
I was trying to get an output of [9, 9, 9], but I am mostly getting [8, 8, 8].
But if I try running const output = net.run([[5, 5, 5], [6, 6, 6]]); I am easily getting [7, 7, 7] & consecutive output with other numbers in the training data sequence.
Is there anyway to train it so that I can get the desired output and the use it for other patters?
You are using a LSTM time step recurrent neural network trained using "supervised learning": https://en.wikipedia.org/wiki/Supervised_learning, which provides similar output values it has been given previously to the .run() call.
What it seems you want is a LSTM time step recurrent neural network trained using "reinforcement learning": https://en.wikipedia.org/wiki/Reinforcement_learning, which can output values it has seen before, but also new ones, using values it has never been given previously to the .run() call, based off exploitation and exploratory (random) findings.
Brain.js doesn't yet have a reinforcement learning API, although that will be the focus after v2 stabilizes.
Ty for providing a clear question and reproduction steps. I've included your sample, working in the browser so others can play with it: https://jsfiddle.net/robertleeplummerjr/4o2vcajt/1/
I'm having a nightmare with colour matrices. I'm using an adjustment layer in photoshop with the values Hue: -37, Saturation: -25 which results in a nice pinky dawn colour:
I'm trying to use EaselJS to create my matrix based on the values in my HSL adjustment layer for Rainmeter (which can only use these), so I'm generating my matrix like so:
new createjs.ColorMatrix().adjustColor(0, 0, -25, -37);
See here: http://www.createjs.com/docs/easeljs/classes/ColorMatrix.html#method_adjustColor
This results in a bright green colour as you can see:
Is there another way to generate my colour matrix? Can I convert A Photoshop adjustment layer to a colour matrix?
Could the difference in results be related to not having Colorize checked?
The answer to this turned out to be fairly simple. The matrixes generated were correct with slight differences. These differences turned out to be because a Photoshop HSL adjustment layer also changes the brightness and contrast. I believe that Lightness is a function of Brightness and Contrast although I'm not sure how it is worked out so it's not easy to get it perfect. Trial and error basically.
The reason my colours were totally wrong before was down to the fact that the array generated by ColorMatrix.js fill the matrix top to bottom not left to right.
i.e.:
Array [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Becomes:
Matrix [[0, 2, 4, 6, 8],
[1, 3, 5, 7, 9]]
Shortened for example, true colour matrix will be a 5x5 matrix.
Firstly to understand my issue you should see the pricture in the link below :
http://www.hostfile.nl/fpimages/03bkr5tq46/16043/screenshot.jpeg.html
The idea and my issue is to create a chart of weight such as the picture or the site http://www.loseit.com/#Goals , the description is like this :
1- the chart contain two lines : 1 - Record Today's Weight , 2- My goal weight.
2- so I can record everyday my today's weight and when I click "record" button directly I see new line is added in chart in the space of today (you can see the picture )
what I need is an example or code of chart do almost the same fonctionality,really I'm not professional in javascript code?
You can use Flot (JavaScript library for jQuery to generate charts)
// a null signifies separate line segments
var myData = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
var myGoal = [[0, 20], [12, 20]]
$.plot($("#myChart"), [ myData, myGoal ]);
check out this example : https://refork.codicode.com/xa2e
I need a javascript (HTML4/5) based library to draw a line chart that has irregular data (and one or more series).
Here is an example:
x-axis = [1, 2, 3, 4, 5, 6, 7, 8]
series1 (y-axis) = [6, 10, null, 8, null, 7, 6, 4]
series2 (y-axis) = [null, 8, 8, null, 1, 3, 5, 4]
In this chart the nulls are not taken in consideration; are in some way "skipped" and the line goes directly into the next value. Of course i want to highlight the points to know if a point is or isn't there at that x value.
There are some of this charts with irregular data based on time series (like this highcharts.com/demo/spline-irregular-time) but i need that defining my own (regular) x-axis.
What do you suggest?
Highcharts can accept irregular data without using times.
Basically, you take the example that you posted, and remove the type: 'datetime' option, and specify numbers instead of dates in the series.
I have posted an example here: http://jsfiddle.net/TRLhc/