[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab |
Date: |
Tue, 1 Dec 2020 12:17:11 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 |
URL:
<https://savannah.gnu.org/bugs/?59589>
Summary: default color in bar (and hist) plots is different
from Matlab
Project: GNU Octave
Submitted by: hardy
Submitted on: Tue 01 Dec 2020 05:17:09 PM UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 6.1.0
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Details:
This report is about the color used in bar() and hist() plots, when used
without any additional color options. In this case the colors in Octave (both
intense violet) are different from the colors used in Matlab plots (light and
dark blue). This might be connected to the change of default colormap to
viridis some time ago.
Here is code to reproduce the behavior. I will also attach two SCREENSHOTS
showing the resulting plots in Octave (6.1) and Matlab (R2019b) respectively:
clear, close all, clc
x = rand(1,20);
% color in bar plot:
figure(1)
hbar = bar(x);
title('bar');
barcolor = get(hbar, 'FaceColor')
% result in Matlab: [0 0.447 0.741] (light blue)
% result in Octave: 'flat', and via Gimp on screenshot: [0.267, 0.400, 0.329]
(violet)
% idea where this color (in Matlab) comes from: (light blue)
colororder = get(gca, 'ColorOrder');
colororder1 = colororder(1,:)
% result (in Matlab and Octave): [0 0.477, 0.741] (light blue)
% color in hist plot
figure(2)
hbar2 = bar(x, 'hist'); % which I think is the same as: hist(x)
title('hist');
histcolor = get(hbar2, 'FaceColor')
% result in Matlab: 'flat', and via Gimp on screenshot: [0.239, 0.149, 0.659]
(dark blue)
% result in Octave: 'flat', and via Gimp in screenshot: [0.267, 0.400, 0.329]
(violet)
This might mostly be an aesthetic problem, since one can always change the
colors used by Octave plots. Nevertheless this "aggressivly" violet color used
by Octave doesn't fit well into the colors used in most other Octave plots and
has therefore bothered my for quite some time already.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 01 Dec 2020 05:17:09 PM UTC Name: Screenshot_Matlab.png Size:
39KiB By: hardy
<http://savannah.gnu.org/bugs/download.php?file_id=50368>
-------------------------------------------------------
Date: Tue 01 Dec 2020 05:17:09 PM UTC Name: Screenshot_Octave.png Size:
35KiB By: hardy
<http://savannah.gnu.org/bugs/download.php?file_id=50369>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59589>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab,
Hartmut <=
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/01
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/01
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Hartmut, 2020/12/02
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/02
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Hartmut, 2020/12/03
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Hartmut, 2020/12/03
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/03
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/03
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Hartmut, 2020/12/04
- [Octave-bug-tracker] [bug #59589] default color in bar (and hist) plots is different from Matlab, Rik, 2020/12/04