AmChart HeatMap with the same categories on value axis - charts

I have an matrix with correlation values beetween objects and I have to show it on heat map using amchart library. I'm using this example (it's with jsfiddle) but I can't make it works to have the same values also on left axis.
Here is example what I have now, I need to have the same labels 'CAT[i]' on left axis.
How to solve it ?

You can use labelFunction to modify the labels of your value axis.
I think this should fit your needs.

Related

MATLAB - Filling a map with a gradient of two colors based on city colors

I have a map where each city is classified somewhere between r=0 and r=1, which I have plotted in the following image using the color [r 0 1-r], which gives me a color between red and blue for each city. In this case, the circles are just for testing, and should not be visible in the final image. Currently the circle radius represents the amount of data available for each city. The country outline uses the borders data. Here's the result so far:
My goal is to fill the map with a non-linear gradient of red/blue, taking into account this data and extrapolating it.
(In this example the border seems pretty linear, but that's not always the case, hence the need for a non-linear gradient)
Can anyone point me in the right direction? Thank you!
What you're probably looking for is griddata, which lets you interpolate (unevenly) scattered data points using various interpolation methods. So you could evaluate the interpolation on a grid (which can be created using meshgrid or ndgrid) and then e.g. use surf to plot the interpolated function.

How to fill colors in contour circles in paraview?

I have a triangulation surface, and there is a point data named rhoA on it. I plot rhoA in paraview and plot the contour with just one contour value. So you can see many circles on the surface.
But what I need is to fill red colors in the circles and don't show other parts. So how to do it in paraview?
Use the Clip filter and set the Clip Type to Scalar. Set the Scalars property to rhoA and set Value to your threshold value. This filter will cut cells, giving you a more precise surface than the Threshold filter will.
Here is an example of the results you can expect doing this:
You can either :
Use the banded countour filter from VTK, that you will need to expose with a XML only plugin first (hard but precise and efficient)
Use treshold filter (the cut will not be on the contour, whole cells will be extracted)

How to reverse the direction of Y-Axis of MatLab figure generated by `imagesc()` function

I am trying to display data in a matrix using imagesc() function but it is showing row index in decreasing order (Assuming origin at left-bottom). Any idea what mistake i could be making or how to correct this?
The matrix only has zeros and ones in it.
Set Ydir property of the current axes to normal
By default, imagesc uses reverse for YDir
set(gca,'YDir','normal');
See Documentation for Axes properties
Before:
After:
Note: This completely flips the inside data as well (it supposed to). As you are dealing with matrices, I hope this is what you want.
If you don't want to affect inside data, you need to change order of YTickLabels instead.
There's another option which requires slightly less code:
axis ij
Reverse the coordinate system so that the y values increase from top to bottom.
As in this case (as it is already reversed), you could use
axis xy
To get back to normal, so that y values increases from bottom to top.
As mentioned in the docs of axis.

Set Matlab's Contour graph x-axis scale?

I am trying to graph a contour graph with a two dimentional matrix, v. v contains velocity data, y-index represents depth, x-index is mapped to a 1d-vector containing latitude info, lat.
when I graph contour(v), the x-axis is index, but I wish to show the latitude (also scale accordingly), I tried contour(lat,v) but it just shows me a blank graph, how should I graph it?
Without having an example dataset, it's hard to say for sure... but I suspect that what you need to do is use the contour(X,Y,Z) form of contour. If you want to specify one axis, you need to specify both. In your case, it would be:
contour(lat,depth,v)
If you're happy using the y-index rather than an actual depth vector, you can do
contour(lat,1:size(v,2),v)

"2D" plot with square colour in grid indicative of value - the ArcGIS look

I've looked up surface plots and contour plots but cannot find the appropriate format. I am not concerned with height and want a bird's eye view of a flat grid - much like the format of ARCGis.
I have random values between 0 to 10 in a 7x7 matrix.
I want to draw a grid 7 by 7 that is 2D where the individual grid cells are block-coloured according to their value.
The top left value of the matrix is the top left cell of the plot and so on. They should align.
I don't want to have to export matlab's output and put it back into ARCG each time I get a result. Thanks for your advice guys!
If you have a 2D array, you should be able to just "show" it like an image. Try using imagesc() with colormap on. You can change the colormap, size, etc.