change background color in parallelplot

Hi. currently using paralleplot. matlab R2022b.
Didn't find a way to make background color black. By default it's white and not very suitable in my case (lots of lines, so i use line trasperancy). Any suggestions?
thanks

1 件のコメント

Adam Danz
Adam Danz 2025 年 7 月 11 日
Setting the background color to black sounds like a custom dark theme is being applied. Starting in R2025a you could set the theme to dark.
tsunamis = readtable('tsunamis.xlsx');
figure('Units','normalized','Position',[0.3 0.3 0.45 0.4])
coordvars = {'Year','Validity','Cause','Country'};
p = parallelplot(tsunamis,'CoordinateVariables',coordvars,'GroupVariable','Validity');
theme dark

サインインしてコメントする。

 採用された回答

Luca Ferro
Luca Ferro 2023 年 4 月 13 日

1 投票

I don't think it is possible. I tried to look into all the properties of a parallelplot figure (and more in general of a plot figure) using the commands:
%use only after plotting
inspect(gca) %for axis proeperties
inspect(gcf) %for figure properties
but coulnd't find any that changes the plot area background.
Closest i got was to change the figure background with
set(gcf, 'color', [1 1 0]) %yellow
but the plotting area is still white.

3 件のコメント

pawell t
pawell t 2023 年 4 月 14 日
well, basically parallelplot uses parallelcoords function. From the jump didn't find a way to adjust background color in it either. Probably I'm just not as skilled as the task requires.
Ok, additional questions that are not as vital, but still:
1) Can I change ticklables and ticksize in Y axes? For example, if column RO.A of table RO is on axis - then lables and ticksize shoud be as unique(RO.A).
2) Color of axes - make it white, so it would be visible on black background (if we are lucky enough to figure it out (: )
3) Switch off hint-box on the chart. Currently it's so big, that it covers the whole axis or even two.
thanks (:
Luca Ferro
Luca Ferro 2023 年 4 月 17 日
編集済み: Luca Ferro 2023 年 4 月 17 日
it should be better to post them as separate questions so that you can then accept the answers and also they would show in the questions archive.
Anyways:
Check this for the size: TickSize
For the labels there is this function: xticklabels() and of course yticklabels()
For coloring axes:
set(gca,'XColor','g','YColor','g'); %g is for green
pawell t
pawell t 2023 年 4 月 21 日
thnx!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2023 年 4 月 13 日

コメント済み:

2025 年 7 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by