|
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "cell_type": "code", |
19 | | - "execution_count": 2, |
| 19 | + "execution_count": 1, |
20 | 20 | "metadata": {}, |
21 | | - "outputs": [], |
| 21 | + "outputs": [ |
| 22 | + { |
| 23 | + "name": "stderr", |
| 24 | + "output_type": "stream", |
| 25 | + "text": [ |
| 26 | + "INFO:rdkit:Enabling RDKit 2021.09.4 jupyter extensions\n" |
| 27 | + ] |
| 28 | + } |
| 29 | + ], |
22 | 30 | "source": [ |
23 | 31 | "import pandas as pd\n", |
24 | 32 | "import plotly.express as px\n", |
|
44 | 52 | }, |
45 | 53 | { |
46 | 54 | "cell_type": "code", |
47 | | - "execution_count": 4, |
| 55 | + "execution_count": 2, |
48 | 56 | "metadata": {}, |
49 | 57 | "outputs": [], |
50 | 58 | "source": [ |
|
71 | 79 | }, |
72 | 80 | { |
73 | 81 | "cell_type": "code", |
74 | | - "execution_count": 7, |
| 82 | + "execution_count": 3, |
75 | 83 | "metadata": {}, |
76 | 84 | "outputs": [ |
77 | 85 | { |
|
4433 | 4441 | }, |
4434 | 4442 | { |
4435 | 4443 | "cell_type": "code", |
4436 | | - "execution_count": 8, |
| 4444 | + "execution_count": 4, |
4437 | 4445 | "metadata": {}, |
4438 | 4446 | "outputs": [ |
4439 | | - { |
4440 | | - "name": "stderr", |
4441 | | - "output_type": "stream", |
4442 | | - "text": [ |
4443 | | - "C:\\Users\\User\\.conda\\envs\\torch_env\\lib\\site-packages\\jupyter_dash\\jupyter_app.py:139: UserWarning:\n", |
4444 | | - "\n", |
4445 | | - "The 'environ['werkzeug.server.shutdown']' function is deprecated and will be removed in Werkzeug 2.1.\n", |
4446 | | - "\n" |
4447 | | - ] |
4448 | | - }, |
4449 | 4447 | { |
4450 | 4448 | "data": { |
4451 | 4449 | "text/html": [ |
|
4461 | 4459 | " " |
4462 | 4460 | ], |
4463 | 4461 | "text/plain": [ |
4464 | | - "<IPython.lib.display.IFrame at 0x20f8e54f6a0>" |
| 4462 | + "<IPython.lib.display.IFrame at 0x7fc93564f610>" |
4465 | 4463 | ] |
4466 | 4464 | }, |
4467 | 4465 | "metadata": {}, |
|
4481 | 4479 | "app_scatter.run_server(mode='inline', port=8700, height=1000)\n" |
4482 | 4480 | ] |
4483 | 4481 | }, |
| 4482 | + { |
| 4483 | + "cell_type": "markdown", |
| 4484 | + "metadata": {}, |
| 4485 | + "source": [ |
| 4486 | + "**Hoverbox transparency (27th Feb)** - the transparency of the hoverbox and the drawn molecule can be controlled by the `alpha` and `mol_alpha` parameters, respecively. The default values are `0.75` and `0.7` by personal preference (those are the values in the plot above), here is an example with smaller alpha values:" |
| 4487 | + ] |
| 4488 | + }, |
| 4489 | + { |
| 4490 | + "cell_type": "code", |
| 4491 | + "execution_count": 6, |
| 4492 | + "metadata": {}, |
| 4493 | + "outputs": [ |
| 4494 | + { |
| 4495 | + "data": { |
| 4496 | + "text/html": [ |
| 4497 | + "\n", |
| 4498 | + " <iframe\n", |
| 4499 | + " width=\"100%\"\n", |
| 4500 | + " height=\"1000\"\n", |
| 4501 | + " src=\"http://127.0.0.1:8010/\"\n", |
| 4502 | + " frameborder=\"0\"\n", |
| 4503 | + " allowfullscreen\n", |
| 4504 | + " \n", |
| 4505 | + " ></iframe>\n", |
| 4506 | + " " |
| 4507 | + ], |
| 4508 | + "text/plain": [ |
| 4509 | + "<IPython.lib.display.IFrame at 0x7fc9346330d0>" |
| 4510 | + ] |
| 4511 | + }, |
| 4512 | + "metadata": {}, |
| 4513 | + "output_type": "display_data" |
| 4514 | + } |
| 4515 | + ], |
| 4516 | + "source": [ |
| 4517 | + "fig_scatter.update_layout(title='ESOL Regression with more transparent hoverboxes')\n", |
| 4518 | + "\n", |
| 4519 | + "app_scatter_alpha = molplotly.add_molecules(fig=fig_scatter,\n", |
| 4520 | + " df=df_esol,\n", |
| 4521 | + " smiles_col='smiles',\n", |
| 4522 | + " title_col='Compound ID',\n", |
| 4523 | + " alpha=0.4,\n", |
| 4524 | + " mol_alpha=0.3,\n", |
| 4525 | + " )\n", |
| 4526 | + "\n", |
| 4527 | + "# change the arguments here to run the dash app on an external server and/or change the size of the app!\n", |
| 4528 | + "app_scatter_alpha.run_server(mode='inline', port=8010, height=1000)\n" |
| 4529 | + ] |
| 4530 | + }, |
4484 | 4531 | { |
4485 | 4532 | "cell_type": "markdown", |
4486 | 4533 | "metadata": {}, |
|
4753 | 4800 | }, |
4754 | 4801 | { |
4755 | 4802 | "cell_type": "code", |
4756 | | - "execution_count": 13, |
| 4803 | + "execution_count": null, |
4757 | 4804 | "metadata": {}, |
4758 | 4805 | "outputs": [], |
4759 | 4806 | "source": [ |
|
12524 | 12571 | "name": "python", |
12525 | 12572 | "nbconvert_exporter": "python", |
12526 | 12573 | "pygments_lexer": "ipython3", |
12527 | | - "version": "3.9.7" |
| 12574 | + "version": "3.10.0" |
12528 | 12575 | }, |
12529 | 12576 | "orig_nbformat": 4 |
12530 | 12577 | }, |
|
0 commit comments