Giter Site home page Giter Site logo

Comments (11)

theengineear avatar theengineear commented on May 5, 2024

@etpinard, this is perfect. Thanks for the list, I'll crank these out tonight. I hadn't ever thought to convert the '\n' to
, that's a really good call.

from plotly.py.

etpinard avatar etpinard commented on May 5, 2024

no problem.

from plotly.py.

theengineear avatar theengineear commented on May 5, 2024

also, number (7), with the 'ticksuffix' is only allowed in polar, i believe. Even if you throw it in with validate=False, it doesn't show up in the JSON when you check it in plotly. not anything we can do about that for now.

from plotly.py.

theengineear avatar theengineear commented on May 5, 2024

for number (5), i like this idea, but i don't like being sneaky and changing things behind the user's back. For instance this could potentially be a nuisance if you're using mathjax and want to write something like $\nu$! And, yes, a simple rule would be to only change actually escaped things... i'll create a branch for it and see if we like it or not :)

EDIT: duh, '\n' != r'\n' == '\\n', this is no problem.

from plotly.py.

theengineear avatar theengineear commented on May 5, 2024

@etpinard in (3), are you referring to the NB link? Those dashes are put in as traces, I don't think we should try to build in any heuristics there that basically try to infer the following: 'is the user using this trace as a gridline?'

this likely won't get changed.

from plotly.py.

theengineear avatar theengineear commented on May 5, 2024

for (4), somewhere down the road I made the choice to center data-referenced annotations. this is because the actual boxes around the annotations are a bit different for mpl and plotly, therefore things look a little weird.

at any rate, here's that change: #48

from plotly.py.

etpinard avatar etpinard commented on May 5, 2024

Merging both newlines and mpl-annotations into another (local) branch and running

import plotly.plotly as py
dataviz1 = plt.figure(...)
# ...
py.plot_mpl(dataviz1, resize=False)

yields https://plot.ly/~etpinard/343 which is not bad at all.

By zooming out, you can see both the title and the source and info annotations.
These beyond-axis-range annotations should have (in my opinion) 'xref: 'paper' and/or 'yref: 'paper' to make them visible as in mentioned in (6) even if they are set with data coordinates (see renderer.py).

I'll add matplotlylib impefection (8) here:

  • Multi-line mpl annotations (e.g. Randal's source and info annotation) should be converted with 'align': 'left' so that the text is left-aligned, which appears (from my NB) to be mpl's default behavior.

from plotly.py.

etpinard avatar etpinard commented on May 5, 2024

About imperfection (3):

Randal's "grid lines" are actually traces themselves. They were made with:

for y in range(10, 91, 10):  
    plot(range(1968, 2012), [y] * len(range(1968, 2012)), "--", 
         lw=0.5, color="black", alpha=0.3)  

so matplotlylib has no reason to considered them grid lines. My mistake.

from plotly.py.

etpinard avatar etpinard commented on May 5, 2024

And, by the way, @theengineear I can take a shot at these if you prefer.

from plotly.py.

theengineear avatar theengineear commented on May 5, 2024

nah, it's no problem. since you've been working with graphs more on the mpl side of things, it's probably most productive if we keep this workflow up! i'll just be honest about whether or not certain issues are fixable. perhaps we should start opening these issues in separate github issues though? That way we can close them as they're completed instead of letting this single issue thread get enormous.

thanks for the help!

from plotly.py.

etpinard avatar etpinard commented on May 5, 2024

Closed, as now these matplotlylib imperfections are packaged into separate Github issues.

from plotly.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.