Do you think I can achieve this in highcharts?
I have dataset with 3 variables: X,Y and Date. I need to plot on a X Y chart the variables X and Y, but also I would like to present the date as gradient on the line. For example, if the series has a green color assigned, the oldest point in the series would be set to a light green and the most recent a dark green.
Thanks.
Leandro
Related
I am working on creating a risk matrix where the gradient needs to represent risk. I have used the TChart editor to set colors (green, yellow, red) and direction ("Diagonal Up") for the gradient color. It all looks good except that the gradient goes to the edge of the TChart Panel rather than being cropped at the X, and Y axis. This makes the most intense colors outside of the data.
Is there a way to make the gradient stay within X & Y?
Thanks.
Sample Showing gradient outside of grid
I'm reading a paper about image processing and came across this color histogram:
image. But I'm not sure how to interpet it. The 3 different curves are for red, green and blue. But what is on the X and Y-axis? My guess would be X-axis going from 0 to 255 for the 'intensity' of the color and Y-axis the amount of pixels in the image that have this intensity. Could anyone confirm this or correct me if I'm wrong?
If I know well, someone please correct me if I am wrong, the X axis represents the possible values of a color from either one of the RGB channels (a value in the [0-255] interval), and the Y axis represents the number of pixels having that value.
I have a chart with multiple axes. The same axis can be used for multiple curves.
I would like to draw colored swatches next to the y axes to make it easier to identify which curve belongs to which axis.
I don't find any API setting or sample. Is it possible? If yes, how?
I have a problem about plotting 3D matrix. Assume that I have one image with its size 384x384. In loop function, I will create about 10 images with same size and store them into a 3D matrix and plot the 3D matrix in loop. The thickness size is 0.69 between each size (distance between two slices). So I want to display its thickness by z coordinate. But it does not work well. The problem is that slice distance visualization is not correct. And it appears blue color. I want to adjust the visualization and remove the color. Could you help me to fix it by matlab code. Thank you so much
for slice = 1 : 10
Img = getImage(); % get one 2D image.
if slice == 1
image3D = Img;
else
image3D = cat(3, image3D, Img);
end
%Plot image
figure(1)
[x,y,z] = meshgrid(1:384,1:384,1:slice);
scatter3(x(:),y(:),z(:).*0.69,90,image3D(:),'filled')
end
The blue color can be fixed by changing the colormap. Right now you are setting the color of each plot point to the value in image3D with the default colormap of jet which shows lower values as blue. try adding colormap gray; after you plot or whichever colormap you desire.
I'm not sure what you mean by "The problem is that slice distance visualization is not correct". If each slice is of a thickness 0.69 than the image values are an integral of all the values within each voxel of thickness 0.69. So what you are displaying is a point at the centroid of each voxel that represents the integral of the values within that voxel. Your z scale seems correct as each voxel centroid will be spaced 0.69 apart, although it won't start at zero.
I think a more accurate z-scale would be to use (0:slice-1)+0.5*0.69 as your z vector. This would put the edge of the lowest slice at zero and center each point directly on the centroid of the voxel.
I still don't think this will give you the visualization you are looking for. 3D data is most easily viewed by looking at slices of it. you can check out matlab's slice which let's you make nice displays like this one:
slice view http://people.rit.edu/pnveme/pigf/ThreeDGraphics/thrd_threev_slice_1.gif
I have a Highcharts scatter plot with a datetime x axis. The x values are all in the past. The y coordinates are positive integers, typically in the range 100..10k. I want to draw lines from the imaginary point (tomorrow, 0) back to some of the data points.
The Renderer's path command looks to take absolute coordinates in chart space. How do I transform the point (tomorrow,0) into those absolute coordinates?
Also, assume the data was from 1995..2005. The default auto-scaling of Highcharts would make tomorrow be off the chart to the right. What will happen when drawing the path? Will the chart remain the same scale and the line be clipped at the right-hand edge? (That would be OK). Would the chart be redrawn with a new scale so that the x axis covered the whole span from 1995 to tomorrow? Something else?
Thanks in advance...
Found it. There is a translate() function to do the conversion. See the Highcharts support forum thread for info on the function.
Use Axis.toPixels() and Axis.toValue()