Venkat kamal
Venkat kamal

Reputation: 279

Setting axis limits for matrix projection

I am projecting the values of a matrix using imagesc. I want to set the X-axis limits between [0:22000] seconds. I wrote a sample code for this. It's not working as expected. Any help will be appreciated.

cars_in_field = cell2mat(cars_in_field);
cars_in_garage = cell2mat(cars_in_garage);
cars_in_workshop = cell2mat(cars_in_workshop);

all_area_for_visual= 
cars_in_field+2*cars_in_garage+3*cars_in_workshop
figure()
imagesc(transpose(all_area_for_visual));
colormap("jet")
xlim([0 ,22000])

enter image description here; enter image description here

Upvotes: 1

Views: 38

Answers (1)

amahmud
amahmud

Reputation: 434

Try this,

figure
imagesc(transpose(all_area_for_visual));
colormap("jet");
xlim([0 22000]);

Upvotes: 1

Related Questions