Skip to content
This repository was archived by the owner on Mar 7, 2020. It is now read-only.

Nicer legend.#7

Merged
samschott merged 3 commits intoOE-FET:developfrom
samschott:patch-2
Jun 18, 2019
Merged

Nicer legend.#7
samschott merged 3 commits intoOE-FET:developfrom
samschott:patch-2

Conversation

@samschott
Copy link
Copy Markdown
Member

No description provided.

2xB and others added 3 commits June 17, 2019 19:10
Issue pyqtgraph#835 shows that comparing `bins`, which may be a numpy array, with a string `'auto'` leads to element-wise comparison, because the `==` operator for numpy arrays is used. With this commit, potential array and string are switched, so the `==` operator for strings is used, which does no element-wise comparison.
Prevent element-wise string comparison
- Give kwargs for legend frame and background colors instead of hard-coded values.
- Reduce spacing for more compact legend
- Give separate kwarg `labelTextColor`.
- New method to clear all legend items.
- New methods to get and change `offset` relative to the legend's parent.
- Horizontal instead of tilted lines for legend pictures.
@samschott samschott merged commit 077f85a into OE-FET:develop Jun 18, 2019
samschott pushed a commit that referenced this pull request Jun 18, 2019
# This is the 1st commit message:

Merge pull request pyqtgraph#921 from 2xB/patch-9

Prevent element-wise string comparison
# The commit message #2 will be skipped:

# `_updateMaxTextSize` to reduce text size when no longer needed
#
# Currently `_updateMaxTextSize ` will increase the current space required for axis labels, if necessary, but not decrease it when the extra space is no longer needed. The proposed change will release no longer needed space again.

# The commit message #3 will be skipped:

# Clipping: don't assume that x-values have uniform spacing
#
# Do not assume that x-values have uniform spacing -- this can cause problems especially with large datasets and non-uniform spacing (e.g., time-dependent readings from an instrument).
# 
# Use `np.searchsorted` instead to find the first and last data index in the view range. This only assumes that x-values are in ascending order. This prevents potentially too strong clipping.

# The commit message #4 will be skipped:

# draw path all around curve filling if enabled

# The commit message #5 will be skipped:

# allow different color for tick labels
#
# created new `textPen` and `setTextPen` methods

# The commit message #6 will be skipped:

# Revert "draw path all around curve filling if enabled"
#
# This reverts commit d5dd912.

# The commit message #7 will be skipped:

# Revert "Clipping: don't assume that x-values have uniform spacing"
#
# This reverts commit 365c13f.

# The commit message pyqtgraph#8 will be skipped:

# Revert "`_updateMaxTextSize` to reduce text size when no longer needed"
#
# This reverts commit 1ea6461.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants