Closed frecloud closed 2 years ago
Also I can't usetick_labels_minor_x_rotation=45
or tick_labels_major_x_font_color='#FF0000'
why is that?
You can reduce the box label font sizes using box_group_label_font_size
import fivecentplots as fcp
from pathlib import Path
import pandas as pd
df = pd.read_csv(Path(fcp.__file__).parent / 'test_data/fake_data_box.csv')
fcp.boxplot(df, y='Value', groups=['Batch', 'Sample'], box_group_label_font_size=6)
You can also set a new default in your theme file so you don't have to add this every time
https://endangeredoxen.github.io/fivecentplots/0.5.0/api/boxplot.html#boxplot
I have no issue changing the tick label color
fcp.plot(df, x='Voltage', y='I [A]', legend=['Die', 'Substrate'], ax_size=[400, 300],
filter='Target Wavelength==450 & Temperature [C]==25 & Boost Level==0.2',
tick_labels_major_x_font_color='#FF0000')
but I'm seeing some weirdness with the minor ticks and will get back to you
If you get different results than what I posted above, please try to install fcp in a clean env. If it works there then you may have some issue in your current env
It is working, thanks. One more thing, do we have something for rotation also for boxgroup..... ?
See the link I posted above. All kwargs are detailed in the API section of the docs.
Custom rotation of box labels is not currently supported. The default rotation is 0 deg. If the labels are too wide they will automatically rotate to 90 deg. Do you need this feature?
To get back to your tick question, the following should work:
import fivecentplots as fcp
import pandas as pd
from pathlib import Path
df = pd.read_csv(Path(fcp.__file__).parent / 'test_data' / 'fake_data.csv')
fcp.plot(df, x='Voltage', y='I [A]', legend=['Die', 'Substrate'], ax_size=[400, 300],
filter='Target Wavelength==450 & Temperature [C]==25 & Boost Level==0.2',
tick_labels_major_x_font_color='#FF0000', tick_labels_minor=True, tick_labels_minor_x_rotation=45)
and indeed it does work--sometimes
However, I can run the exact same block of code in the same python env and sometimes the ticks get mangled like this:
I don't know where this bug is coming from but will continue investigating
I have found and resolved this bug. The fix will be included in the beta of v0.5.0. Thanks
I want to reduce the fontsize of overlapping values of 'RegWr00_DATAPEDESTAL' So that user can read the values clearly. I don't want to increase the ax_size[0], Just want to reduce the font size of these value to make them readable. I tried diff kwargs from doc but none of them isn't working. Thanks in advance, please assist me.