Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed annotations referenced to data to mimic mpl alignment. #48

Merged
merged 1 commit into from Jul 3, 2014

Conversation

theengineear
Copy link
Contributor

In response to (4) in #46

@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2014

This appears to work fine.

Off the mpl-annotations branch:

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

yields https://plot.ly/~etpinard/341

dataviz1_get = py.get_figure("https://plot.ly/~etpinard/341")
[dataviz1_get['layout']['annotations'][i]['xanchor'] for i in range(3)] # --> ['left','left','left']

The question now becomes if and/or how to automatically increase the margins to make annotations like theses fit in the figure's frame?

Note that we could also increase the range (in this case, the x-axis' range) to make the annotations fit. But, this is probably not the best solution.

@theengineear
Copy link
Contributor Author

Well, i'll be getting the frame to go away there at least... it's extremely difficult to track down whether or not the ticks are set to be on or off so far. But i'm pretty sure i'll be able to track that down soon.

In other words, we wouldn't need to increase the side of the data area if the frame wasn't showing in that plot.

@theengineear
Copy link
Contributor Author

this is pretty related to (#53), i'm going to merge this so annotations are all set.

theengineear added a commit that referenced this pull request Jul 3, 2014
changed annotations referenced to data to mimic mpl alignment.
@theengineear theengineear merged commit 9ad380a into master Jul 3, 2014
@theengineear theengineear deleted the mpl-annotations branch July 3, 2014 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants