[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52842] Implement "none" as a standard option
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties |
Date: |
Tue, 5 Feb 2019 11:22:45 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #7, bug #52842 (project octave):
@Pantxo: Feel free to add an updater to make the code more regular. I think
the existing code was more of a hack to get things to work, before we were
more thoughtful about the code architecture.
Also, as you have guessed, the whole purpose of this feature request is to
have more control over graphics objects so I can create complicated scenarios.
For example, to have just a horizontal baseline, I might do
clf;
hax = gca;
set (hax, 'xaxislocation', 'origin')
ylim ([-1 1])
set (hax, 'ycolor', 'none')
I'm not sure I agree with it, but for axes sub-objects like ylabel, setting
the color to "none" makes the object disappear, but it is still including in
positioning calculations. Setting the string to the empty string, ylabel
(''), also causes the object to disappear AND the axes are re-sized to account
for the disappearance.
For text objects the behavior is different. No color means the object isn't
plotted. I tested with this code
clf;
ht = text (0.5, 0.5, 'Hello World', 'FontSize', 16);
set (ht, 'backgroundcolor', 'm')
set (ht, 'edgecolor', 'k', 'linewidth', 3)
set (ht, 'color', 'none')
An empty string also causes the text object to disappear
clf;
ht = text (0.5, 0.5, 'Hello World', 'FontSize', 16);
set (ht, 'backgroundcolor', 'm')
set (ht, 'edgecolor', 'k', 'linewidth', 3)
set (ht, 'string', '')
Given that this is how text objects work, and a ylabel is just a text object,
I would say we code up the axes behavior whichever way is most convenient. If
that means the object isn't drawn and the axes position is re-calculated that
would be fine.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?52842>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Rik, 2019/02/04
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Pantxo Diribarne, 2019/02/04
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Rik, 2019/02/04
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Rik, 2019/02/04
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Philip Nienhuis, 2019/02/05
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Pantxo Diribarne, 2019/02/05
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties,
Rik <=
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Pantxo Diribarne, 2019/02/05
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Rik, 2019/02/06
- [Octave-bug-tracker] [bug #52842] Implement "none" as a standard option for graphics color properties, Rik, 2019/02/06