help-octave
[Top][All Lists]
Advanced

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

RE: How to change the scale on a contour plot colorbar


From: Markus Mützel
Subject: RE: How to change the scale on a contour plot colorbar
Date: Tue, 18 Feb 2020 16:42:47 +0100

Am 18. Februar 2020 um 16:27 Uhr schrieb "James Watts (Contractor)":
> Markus,
> Thanks - I just tried your code and it works for me too -  I didn't think to 
> try manipulating the 'y' axis for the colorbar.
> All the best, James.

Please, keep the mailing list in CC so that others might also benefit.

Markus

> -----Original Message-----
> From: "Markus Mützel"
> Sent: 18 February 2020 15:18
> To: James Watts (Contractor)
> Cc: address@hidden
> Subject: Re: How to change the scale on a contour plot colorbar
> 
> Am 18. Februar 2020 um 15:36 Uhr schrieb "James Watts
> > Can anyone tell me how to change the numeric scale on the colorbar legend 
> > on a contour plot?
> >
> > I have tried various combinations of caxis and zaxis, cticks, zticks, 
> > cticklabels, zticklabels and I either see nothing change or I get an 
> > error.
> 
> The colorbar handle is an axes object in Octave.
> I don't know your CLims and where you want to put labels exactly. But the 
> following works for me:
> 
> hax = axes('CLim', [-12, 12]);
> hcb = colorbar('peer', hax);
> set(hcb, 'YTick', [-12:3:12], 'YTickLabel', {'a', 'b', 'c', 'd', 'e', 'f', 
> 'g', 'h', 'i'});
> 
> > I can’t find a description of this in the Octave or Matlab documentation.
> 
> See the "Implementation Note" at the end of the doc string for colorbar.
> 
> HTH,
> Markus
> 
> 
> -- IMPORTANT NOTICE: 
> 
> The contents of this email and any attachments are confidential and may also 
> be privileged. If you are not the intended recipient, please notify the 
> sender immediately and do not disclose the contents to any other person, use 
> it for any purpose, or store or copy the information in any medium. Thank you.
>



reply via email to

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