On my graph there are strings which print inside boxes in a rectangle. Sometimes the strings are too long and other times the value is null (which show up as NaN) and I’d like to hide (not print) those so they don’t show up on the graph. Is there a way to avoid printing certain strings? I can’t change the color because since the graph has multiple colored boxes, there’re no backgrounds against which white strings would appear hidden.
I answered my own question. Inside the column data source, you can append the fillna(“”) function which allows you to change NaN to a zero-length string. You can see I still have a lot to learn!
On Tuesday, August 5, 2014 12:22:24 PM UTC-7, Armen Alexanian wrote:
Hi,
On my graph there are strings which print inside boxes in a rectangle. Sometimes the strings are too long and other times the value is null (which show up as NaN) and I’d like to hide (not print) those so they don’t show up on the graph. Is there a way to avoid printing certain strings? I can’t change the color because since the graph has multiple colored boxes, there’re no backgrounds against which white strings would appear hidden.
A user that answered himself… nice
Thanks for the question… and the answer!
Damian
···
On Wed, Aug 6, 2014 at 2:32 PM, Armen Alexanian [email protected] wrote:
I answered my own question. Inside the column data source, you can append the fillna(“”) function which allows you to change NaN to a zero-length string. You can see I still have a lot to learn!
On Tuesday, August 5, 2014 12:22:24 PM UTC-7, Armen Alexanian wrote:
Hi,
On my graph there are strings which print inside boxes in a rectangle. Sometimes the strings are too long and other times the value is null (which show up as NaN) and I’d like to hide (not print) those so they don’t show up on the graph. Is there a way to avoid printing certain strings? I can’t change the color because since the graph has multiple colored boxes, there’re no backgrounds against which white strings would appear hidden.
Thanks very much!
Armen
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
I am glad you found a workaround. As another suggestions I will also mention that it is possible to set the alpha value in a vectorized fashion, so you could make the alpha zero for the values you don't want to show, this will cause them not to be visible. I think your solution is even cleaner, though. It sounds like we might need to take a look at the json encoder, I am not sure that "null" values should render as "NaN".
Bryan
···
On Aug 6, 2014, at 6:32 PM, Armen Alexanian <[email protected]> wrote:
I answered my own question. Inside the column data source, you can append the fillna("") function which allows you to change NaN to a zero-length string. You can see I still have a lot to learn!
On Tuesday, August 5, 2014 12:22:24 PM UTC-7, Armen Alexanian wrote:
Hi,
On my graph there are strings which print inside boxes in a rectangle. Sometimes the strings are too long and other times the value is null (which show up as NaN) and I'd like to hide (not print) those so they don't show up on the graph. Is there a way to avoid printing certain strings? I can't change the color because since the graph has multiple colored boxes, there're no backgrounds against which white strings would appear hidden.
On Wed, Aug 6, 2014 at 12:07 PM, Bryan Van de Ven [email protected] wrote:
Armen,
I am glad you found a workaround. As another suggestions I will also mention that it is possible to set the alpha value in a vectorized fashion, so you could make the alpha zero for the values you don’t want to show, this will cause them not to be visible. I think your solution is even cleaner, though. It sounds like we might need to take a look at the json encoder, I am not sure that “null” values should render as “NaN”.
Bryan
On Aug 6, 2014, at 6:32 PM, Armen Alexanian [email protected] wrote:
I answered my own question. Inside the column data source, you can append the fillna(“”) function which allows you to change NaN to a zero-length string. You can see I still have a lot to learn!
On Tuesday, August 5, 2014 12:22:24 PM UTC-7, Armen Alexanian wrote:
Hi,
On my graph there are strings which print inside boxes in a rectangle. Sometimes the strings are too long and other times the value is null (which show up as NaN) and I’d like to hide (not print) those so they don’t show up on the graph. Is there a way to avoid printing certain strings? I can’t change the color because since the graph has multiple colored boxes, there’re no backgrounds against which white strings would appear hidden.
Thanks very much!
Armen
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].