help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implement in a colorbar legend a decreasing scale


From: Kai Torben Ohlhus
Subject: Re: How to implement in a colorbar legend a decreasing scale
Date: Sun, 13 Oct 2019 01:13:26 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 10/13/19 12:29 AM, Beginner1 via Help list for GNU Octave wrote:
> Hi,
> 
> I wonder how to implement a decreasing scale in a colorbar legend. The scale
> should start at 25 and finish at 1. I tried with the command caxis([25,1]),
> but the console gave me an error:
> "error: caxis: LIMITS must be a numeric 2-element vector where LIM1 < LIM2"
> 
> So I guess the problem is with the fact that the scale is decreasing. If I
> reverse the limits, caxis([1,25]), this works properly but I need to show
> the variation in a decreasing tendency...
> 
> Any advice?
> 
> 
> Thanks
> 

Please provide a small example to help us helping you faster.  Using the
colorbar demo, is that what you want?

   figure;

   colormap ("default");

   n = 64; x = kron (1:n, ones (n,1)); x = abs (x - x.');

   imagesc (x);

   h = colorbar ()

   set (h, "YDir", "reverse")

HTH,
Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]