|
13 | 13 |
|
14 | 14 | # Warning format |
15 | 15 | def warning_on_one_line(message, category, filename, lineno, file=None, line=None): |
16 | | - return ' %s:%s: %s:\n%s\n' % (filename, lineno, category.__name__, message) |
| 16 | + return '%s:%s: %s:\n\n%s\n\n' % (filename, lineno, category.__name__, message) |
17 | 17 | warnings.formatwarning = warning_on_one_line |
18 | 18 |
|
19 | 19 | class PlotlyRenderer(Renderer): |
@@ -503,14 +503,13 @@ def draw_text(self, **props): |
503 | 503 | """ |
504 | 504 | self.msg += " Attempting to draw an mpl text object\n" |
505 | 505 | if not mpltools.check_corners(props['mplobj'], self.mpl_fig): |
506 | | - warnings.warn("Looks like the annotation(s) you are trying " |
507 | | - "to draw lies/lay outside the given figure size.\n" |
508 | | - "Therefore, the resulting Plotly figure may not be " |
509 | | - "large enough to view the full text.\n" |
510 | | - "To adjust the size of the figure, use the " |
511 | | - "'width' and 'height' keys in the Layout object. " |
512 | | - "Alternatively, use the Margin object to adjust the " |
513 | | - "figure's margins.") |
| 506 | + warnings.warn("Looks like the annotation(s) you are trying \n" |
| 507 | + "to draw lies/lay outside the given figure size.\n\n" |
| 508 | + "Therefore, the resulting Plotly figure may not be \n" |
| 509 | + "large enough to view the full text. To adjust \n" |
| 510 | + "the size of the figure, use the 'width' and \n" |
| 511 | + "'height' keys in the Layout object. Alternatively,\n" |
| 512 | + "use the Margin object to adjust the figure's margins.") |
514 | 513 | align = props['mplobj']._multialignment |
515 | 514 | if not align: |
516 | 515 | align = props['style']['halign'] # mpl default |
|
0 commit comments