Answered
Problem in Plotting bar graph with two y axis (Bars overlapping)
The key here is to plot the two sets of bars as _grouped_. However, since they are on different axes you cannot plot the two dat...

7 years ago | 2

Answered
How to Create a seperate colormap for each pi-chart in a subplot
just insert the handle as the first argument of colormap colormap(gca,cmap); minimal working example subplot(1,2,1)...

7 years ago | 1

| accepted

Answered
How to return all points in a polyshape
This is exactly what <https://se.mathworks.com/help/matlab/ref/inpolygon.html *inpolygon*> is for

7 years ago | 0

Answered
Plot bar chart from elements of string
something like this? n=ones(size(thecountry)) [G,ctr]=findgroups(thecountry) nrupt=splitapply(@sum,n,G) bar(nrupt)...

7 years ago | 1

Answered
Multigroup Boxplot dimension error
I found some issues with your approach. Most importantly, the number of rows in the matrix is supposed to represent the number o...

7 years ago | 0

| accepted

Answered
Moving the labels of the z axis to the back of the 3D graph
It's an undocumented feature <https://undocumentedmatlab.com/blog/customizing-axes-part-5-origin-crossover-and-labels> The...

7 years ago | 4

| accepted

Answered
Interpolate big array to match length of smaller array?
You need an x vector for interp. tau_new=interp1(X_tau,tau, X_rho) tau_new is the interpolated vector

7 years ago | 0

Answered
How do I plot military time?
Yes, it's possible. How? Depends on if you have a date associated with those values. Let's say you do not have a date, just a bu...

7 years ago | 0

Answered
Problem in creating hourtly timestamp (time axe)
First of all, your code is buggy. There is no way you can execute those lines by copying them to the workspace, so it is impossi...

7 years ago | 0

Answered
Indexing a matrix along a specific direction
I don't know about the forums collective mind, but I would approach this in a different way. When you have your line, just inter...

7 years ago | 0

Answered
How to retrieve x, y values from surf given z?
Well, you can use xq(zq==v) xq(zq==v) to find the points ( *xq* & *yq* ) where *zq* is equal to some specific value,...

7 years ago | 1

Answered
how do I have a standard colour bar for multiple images?
Just use the same: caxis([min max]) for each axes. You could also try something like this linkprop([ax1 ax2],'CLi...

7 years ago | 0

| accepted

Answered
find a row containing maximum number of black pixel in an image??
This is a response to the question in the title. I don't know what _shirolekha_ means. [~,row]=max(sum(~IM,2))

7 years ago | 0

Answered
How to insert geographical map under other grid data map
First you need a shapefile. You can find shapefiles on different places on the web. I've found <http://www.naturalearthdata.com/...

7 years ago | 1

| accepted

Answered
Create grouped bar chart using figure handle
I don't know what you mean by _figure handles_. However, when you call the bar function mutliple times the outputs are independe...

7 years ago | 0

| accepted

Answered
Adding space for long ticklabels
It's really unnecessary to scale the figure to fit with your text. Better yet, make the figure very large and then crop it when ...

7 years ago | 0

| accepted

Answered
How to find seven peaks in matrix 8192X8192?
What do you mean highest peaks? Highest prominence? Highest peak value? The syntax of findpeaks is the following: [Peaks...

7 years ago | 0

| accepted

Answered
Making a 2D plot of an equation against 2 datasets
x = 1:1:20; y = 1:0.5:8; [X,Y] = meshgrid(x,y); Z = X.*Y; surf(X,Y,Z) zlim([0 10]); You could also repla...

7 years ago | 0

Answered
How can I change the colours in the legend?
I don't think the color information ( |CData| ) in scatter is passed to the legend at all. How could it? A single scatter object...

7 years ago | 0

Answered
how to do repeating numbers in array
A is your array A(A==0)=NaN A=fillmissing(A,'previous')

7 years ago | 0

Answered
Issue with datetime and export_fig
After hours of debugging I finally updated to the newest release of |export_fig| (v 2.0.0.0). Issue resolved. Needless to say I ...

7 years ago | 0

Question


Issue with datetime and export_fig
For years I've never had any issues with *datetime* nor *export_fig*. However, today I noticed some erroneous *datetime* labels ...

7 years ago | 1 answer | 2

1

answer

Answered
pcolor on map axis
something similar to <https://se.mathworks.com/help/map/ref/pcolorm.html *pcolorm*>? I suppose geoshow with <https://se.mathwork...

7 years ago | 0

| accepted

Answered
Is it possible to generate a 'barcode' chart?
Check out this older Q <https://se.mathworks.com/matlabcentral/answers/414253-why-do-plotting-functions-like-bar-or-barh-take...

7 years ago | 0

| accepted

Answered
How do I tune a color scale to a matrix image?
You can easily draw your matrix with a specific colormap. You don't need to convert it to an image beforehand. A=peaks; ...

7 years ago | 0

| accepted

Answered
Make two groups of data from a given data set
Just use logical indexing. Suppose you have a variable A that you want to group based on the values in r. B{1}=A(r<=35); ...

7 years ago | 0

| accepted

Answered
scatter plot custom colors
3rd argument is variable size and 4th is variable color. scatter(a,b,[],c,'filled') where 'filled' is optional. If y...

7 years ago | 0

| accepted

Answered
Surf with wrong colors
Grid is too fine, set 'edgecolor' off. surf(X,Y,Z,'edgecolor','none')

7 years ago | 2

| accepted

Answered
Interpolating 2D data including gaps (rawZ = 0) with GRIDDATA(), but without filling in the data gaps
The nature of your data is a bit unclear. You say scattered data but that the hole is associated with a value of zero. If you ha...

7 years ago | 1

| accepted

Answered
How should i be able to get legend for each new value of v in the following code?
Another way to store legend information easily in a loop is to set the displayname of your plot. For example y=rand(5,5) ...

7 years ago | 0

Load more