I have a 2d Array containing an heatmap representation 6000*6000 pixels, i saw the example on highchart site and especially this one
jsfiddle.net/tZ6GP/5/
and it works.
But my grid is regulary spaced so it's a pity to be forced to create a new array 3 times bigger my original.
Do you know if there is a mean or an other type of chart more simple that could be lighter ? or maybe another library
Best regards
Related
I am trying to figure out how to create this overlaid plot of time-series data, where one of the series should "look" like a histogram.
The problem is I could not figure out how to combine/overlay a histogram with time series data and line/scatter plot and get the histogram xbins to work with the date time data, etc.
So I was also trying to use a bar chart, and create a "pseudo histogram" by removing the gaps between bars, adding outlines, and so forth but that seems fruitless as I don't see a way to control all the borders/lines to that level of control.
The result I am looking for is roughly like so;
Which to me looks like the best match for a plot type should be a histogram, but again I could not figure out how to make that work overlaid with the same x axis as the line/scatter time-series data.
Can anyone offer ideas or point me to an example that might help me understand how to do this ?
I guess I also need to figure out how to align the y-axis scales of the two series also, but that I expect is a different topic...
I am specifically using plotly.js / Javascript
I have a binary image with black particles and white pore space. I am trying to observe the porosity variation across the image. To do this I have originally been using a square grid and measuring the porosity (ratio of black to white pixels) in each grid. I have then been uploading these values to matlab as XYZ coordinates, with X and Y being the centres of each grid and Z being the porosity value. I have then interpolated between these values to produce a porosity map.
However, when using a single square grid, the porosity map is not very representative of the binary image because the grids are coarse. However, I cannot reduce the grid size due to theoretical reasons in what I am trying to do.
However, I have found that if I overlay multiple grids, but which are shifted to the right or downwards incrementally, then I can upload these new XYZ values to matlab and interpolate between them which produces a much better porosity map.
The issue is that I can't find any reference to this method anywhere and so does anyone know if this technique is used at all or in any literature?. Also would interpolating between overlapping squares cause any issues because the porosity map produced using the overlapping squares looks good?
I have been searching the literature for what feels like an age looking for the answer to this question so I'd really appreciate any help.
Instead of using a coarse grid and interpolating between the values, I would use a sliding window (the same size as the cells your coarse grid) and compute the porosity at every position.
The multigrid approach will probably produce artifacts (aliasing issues) and is difficult to interpret.
Here are two pairs of pictures, how to use python to identify the position of objects in the small picture in the big picture, such as the first apple and the second pentagram, can you give me some advice or ideas? Thank you
So my current idea is to figure out where all the objects in this big picture are
And then find out where the object is in the little diagram
And then I'm going to use the objects in the smaller picture to find the positions in the larger picture
So here's the problem
How to find out the position of objects in the graph
How to scale the image due to the different pixels of the image
I'm experimenting using reservoir computing techniques to classify images, but I'm not sure how to convert an arbitrary image to a time series.
I found this approach but it doesn't seem to be general enough.
Thanks!
As defined in that article, a time series is just a single-value function of one variable. However, an image is, in general, a multi-value function of two variables. So, in order to convert from an image to a 'time series', you're projecting down from a higher dimensional space to a lower dimensional one (for example, the radial scanning technique described collapses the image as a whole into an outline, which reduces the dimension to one). A key point is that these projections all 'lose data'. Since they're all lossy, there isn't going to be a 'general' solution that works for all uses of all images.. choosing what data you can afford to lose based on your intended application is a key aspect of using this technique. So, I guess my answer is that there is no single general way to convert an image to a 'time series' that works well for all applications.
I would think along those lines.
An image is a static two dimensional array of pixels recorded of a period in time.
A time series is non-static just like a video is a series of images going from one frame to the next in time.
Not sure I answered the question but I hope this helps.
Im trying to build some text using blocks, which I intend to customize later on. The attached image is a mockup of what i intend to do.
I was thinking of using WebGL, since I want to do it in 3D and I cant do any flash, but Im not sure how to contruct the structure of cubes from the letters. Can anyone give me a suggestion or a technique to map text to a series of points so that seen from far aside they draw that same text?
First, you need a font — a table of shapes for the characters — in a format you can read from your code. Do you already have one? If it's just a few letters, you could manually create polygons for each character.
Then, use a rasterization algorithm to convert the character shape into an array of present-or-absent points/cubes. If you have perfectly flat text, then use a 2D array; if your “customizations” will create depth effects then you will want a 3D array instead (“extruding” the shape by writing it identically into multiple planes of the array).
An alternative to the previous two steps, which is appropriate if your text does not vary at runtime, is to first create an image with your desired text on it, then use the pixels of the image as the abovementioned 2D array. In the browser, you can do this by using the 2D Canvas feature to draw an image onto a canvas and then reading the pixels out from it.
Then to produce a 3D shape from this voxel array, construct a polygon face for every place in the array where a “present” point meets an “absent” point. If you do this based on pairs of neighbors, you get a chunky pixel look (like Minecraft). If you want smooth slopes (like your example image), then you need a more complex technique; the traditional way to produce a smooth surface is marching cubes (but just doing marching cubes will round off all your corners).