Hi,
I’m a new user playing around with Bokeh, and have a few questions I couldn’t find the answers to, if someone has the time to help out:
-
How do I left-align the title? It seems like the “hook” it aligns to is in the center of the plot, so p.title_text_align = ‘left’ doesn’t do it
-
It is possible to have a two-line title? Typing “\n” in the title didn’t work
-
It is possible to have a fixed x axis and y axis bounds? i.e, if I want them to start exactly at (0,0) for example, but auto-scale on the other end? p.xaxis.bounds didn’t seem to do it.
-
Is it possible to not have any external links (for example, to the css from bokeh’s website), but refer to everything locally, or better yet, put everything inside one self contained html file with no need for network access?
Thanks much!
Hi,
The title is a bit of a pain at the moment
1) How do I left-align the title? It seems like the "hook" it aligns to
is in the center of the plot, so p.title_text_align = 'left' doesn't
do it
It is not possible to change the alignment of the title.
2) It is possible to have a two-line title?
I am not aware of a way to do this
3) It is possible to have a fixed x axis and y axis bounds? i.e, if I
want them to start *exactly* at (0,0) for example, but auto-scale on the
other end? p.xaxis.bounds didn't seem to do it.
Have you tried p.xaxis.bounds = (0, None)?
4) Is it possible to not have any external links (for example, to the
css from bokeh's website), but refer to everything locally, or better
yet, put everything inside one self contained html file with no need for
network access?
Yes, to put everything in a self-contained html file you want to use
INLINE resources. If you're using output_file
(bokeh.io — Bokeh 3.3.2 Documentation)
use mode='inline'
Hope this helps,
Sarah Bird
···
On 1/22/16 1:07 AM, [email protected] wrote:
Hi,
I'm a new user playing around with Bokeh, and have a few questions I
couldn't find the answers to, if someone has the time to help out:
1) How do I left-align the title? It seems like the "hook" it aligns to
is in the center of the plot, so p.title_text_align = 'left'
doesn't do it
2) It is possible to have a two-line title? Typing "\n" in the title
didn't work
3) It is possible to have a fixed x axis and y axis bounds? i.e, if I
want them to start *exactly* at (0,0) for example, but auto-scale on the
other end? p.xaxis.bounds didn't seem to do it.
4) Is it possible to not have any external links (for example, to the
css from bokeh's website), but refer to everything locally, or better
yet, put everything inside one self contained html file with no need for
network access?
Thanks much!
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/740ffa92-cba8-49df-96f4-3382ac1da7a5%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/740ffa92-cba8-49df-96f4-3382ac1da7a5%40continuum.io?utm_medium=email&utm_source=footer>\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
Sorry I hadn't seen Mateusz's answer - hopefully you have what you need
between the two of us!
···
On 1/22/16 7:44 AM, Mateusz Paprocki wrote:
Hi,
On Fri, Jan 22, 2016 at 10:07 AM, <[email protected] > <mailto:[email protected]>> wrote:
Hi,
I'm a new user playing around with Bokeh, and have a few questions I
couldn't find the answers to, if someone has the time to help out:
1) How do I left-align the title? It seems like the "hook" it aligns
to is in the center of the plot, so p.title_text_align = 'left'
doesn't do it
This is precisely how it's implemented. This is a bug.
2) It is possible to have a two-line title? Typing "\n" in the title
didn't work
No, not yet. This actually applies to any kind of text.
3) It is possible to have a fixed x axis and y axis bounds? i.e, if
I want them to start *exactly* at (0,0) for example, but auto-scale
on the other end? p.xaxis.bounds didn't seem to do it.
It should be possible when using DataRange1d(). You can set start and/or
end properties to desired values. If you don't set any value, it will be
computed automatically. You may need to set range_padding to 0 to make
axis start exactly at the given point.
4) Is it possible to not have any external links (for example, to
the css from bokeh's website), but refer to everything locally, or
better yet, put everything inside one self contained html file with
no need for network access?
The best way is to use INLINE resources. This way you will have
everything in big HTML file with plot data, bokehjs' javascript and CSS
included.
Mateusz
Thanks much!
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/740ffa92-cba8-49df-96f4-3382ac1da7a5%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/740ffa92-cba8-49df-96f4-3382ac1da7a5%40continuum.io?utm_medium=email&utm_source=footer>\.
For more options, visit
https://groups.google.com/a/continuum.io/d/optout\.
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/CANFzp8jLEseeuqxDeZG5_RqP-8W_UJfk0KYesrYVRBty_6b7GA%40mail.gmail.com
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/CANFzp8jLEseeuqxDeZG5_RqP-8W_UJfk0KYesrYVRBty_6b7GA%40mail.gmail.com?utm_medium=email&utm_source=footer>\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.