Change axis scaling using CSS-Editor

Hello all,

I started working with KNIME a few days ago and at this point I am really fascinated what a fantastic tool it is. However, there are a lot of details where I could need some help from you guys! :slight_smile:
The first problem that I can’t solve on my own is changing the scaling of my Boxplots. I found this ca be done with the CSS-Editor node where a flow variable can be defined. Although I have read the Guide (https://docs.knime.com/latest/analytics_platform_css_guide/index.html) , I need some advice.

Can someone tell me how to use the “knime-axis-max-min” exactly in order to change the scaling?

Or is this approach wrong at all :slight_smile:? Maybe there are easier ways to change axis scaling?

Thank you in advance!
Andreas

1 Like

Hi,
welcome to the KNIME Forum. I am glad you like KNIME! :smiley:
The x-Axis of a boxplot usually displays no numeric values, but only categories. Do you mean the y-Axis? I don’t think this is possible via CSS, as the node automatically computes the scale of the y-Axis based on the minimum and maximum values in the data. It also adjusts the axis when you select another column in the menu, so a fixed value wouldn’t work well. Can you post a screenshot of what you are trying to achieve?
Kind regards
Alexander

1 Like

Hi,

thanks for your fast reply. You are right, the x-Axis displays the category or name of the dataset.
I want to change the y-Axis. As you can see in my Boxplot, the zero value is not centered due to the automatically computed maximum and minimum value. For a better visibility I would like to have the y=0 in the middle of the axis by setting max = 1 and min = -1.

Thanks in advance and best regards
Andreas

Hi Andreas,
unfortunately I think this is not something the boxplot supports. The only option to achieve something like this is to use the Generic JavaScript View and then use the d3 library to implement it yourself. You could probably take a lot from this code: https://www.d3-graph-gallery.com/graph/boxplot_several_groups.html.
Kind regards
Alexander

Hi Alexander,

this is no problem at all, it helps a lot to know that it can’t be done this way! I will have a look at the node you posted, thanks again for your help!

Best regards
Andreas

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.