-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unreadably small plot axis labels on Dell XPS-15 laptop running Windows 10 #819
Comments
What version of Enable are you using, what Kiva backend (I'm guessing "image" if you aren't doing anything special), and what toolkit (Qt or Wx)? We haven't been seeing this issue on other windows machines, but you may have some combination of screen resolution, toolkit, OS and font availability that is causing this. Recent updates added HiDPI support for Qt, but it is a comparatively new feature and so there may be bugs. There is at least one known issue with the support when the resolution changes: enthought/enable#864 There was also a change to the way font lookup is done in Kiva recently which may be impacting this. Things to try:
This is likely an Enable issue, not a Chaco one, per-se, so it would be good if you could open an issue in the Enable repository with a reference to this issue. |
Thank you for the detailed response, @corranwebster ! My System & Configuration Info
Things To TryExplicit setting of toolkit/backend.Adding the following code to the very beginning of my Python source file: from traits.etsconfig.api import ETSConfig
ETSConfig.toolkit = 'qt.celiagg' results in the following backtrace:
However, the following code works and fixes the plot axis label font size problem! from traits.etsconfig.api import ETSConfig
ETSConfig.toolkit = 'qt.qpainter' Question: What do I need to do/install, in order to be able to try the Explicit Font/Size ChoiceNote: The following applies when I'm still using the I am able to get correctly sized plot axis labels on my high-res. Windows 10 machine, using the following Python code addition: LARGE_FONTS = True
title_size = 36
axis_size = 28
tick_size = 26
# Temporary hack, to fix small font size problem on high-res Windows laptop display.
if LARGE_FONTS:
for p in [ plot2,
plot9,
plot_clk_per_hist,
{snip}
plot_bathtub_dfe]:
p.title_font.size = title_size
p.index_axis.title_font.size = axis_size
p.value_axis.title_font.size = axis_size
p.index_axis.tick_label_font.size = tick_size
p.value_axis.tick_label_font.size = tick_size
p.legend.font.size = axis_size However, the plot axis labels then become clownishly large on the other two platforms (Linux & MacOS). Disabling HiDPI Support in
|
Hmmm, my HTML items are still vexed by illegibly small text; any thoughts? ==> Changing the item type from: |
How do I retrieve the system DPI from within my Traits/UI application? |
Apologies, I'm used to having that installed on my system: Thanks for the other reports. It sounds like there may be an issue with font sizes/font rendering in HiDPI mode for the "image" backend. I'm very interested in what happens with the celiagg backend, as this is likely to indicate whether it is a problem with the older backend code, or is also present in newer code. |
The general solution for this is to increase the appropriate
You'll need to drop down to the Qt level, it's not exposed in TraitsUI as we try to abstract that sort of thing away as much as possible. I don't recall the exact way to do it, however. Enable/Chaco will give you what they think the scaling factor should be via the
This is a TraitsUI |
So, this: plot_h_tune = Plot(plotdata, padding_bottom=75) doesn't appear to have any effect. |
Conda does offer the
The |
How do I access the class PyBERT(HasTraits):
...
def log_information(self):
"""Log the system information."""
...
self.log(f"Pixel Scale: {self.window.base_pixel_scale}")
|
@capn-freako not sure, but it's possible that @corranwebster will be AFK for the next week... |
It will be available on your
Try something much larger than 75 - I think the default is 70, so you won't see much difference. |
Problem Description
When running a Chaco-based GUI application on my Dell XPS-15 Wiindows10 laptop, I'm getting unreadably small plot axis labels.
Reproduction Steps:
Run a Chaco-based GUI app. on a Dell XPS-15 running Windows 10.
# Code to reproduce issue here
Expected behavior:
The same application run on a MacBook or under Linux produces acceptably sized plot axis labels.
OS, Python version: [Enter OS name and Python version]
Windows 10
Python 3.8
The text was updated successfully, but these errors were encountered: