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

theme_gray inconsistencies with ggplot2 #85

Closed
funnell opened this issue Oct 30, 2013 · 8 comments
Closed

theme_gray inconsistencies with ggplot2 #85

funnell opened this issue Oct 30, 2013 · 8 comments

Comments

@funnell
Copy link

funnell commented Oct 30, 2013

  • minor gridlines
  • grey borders when there should be none
  • outward facing major tick marks on left and bottom borders

The way themes are handled might need to be changed to allow theming of some plot elements that aren't adjustable through rc params.

@glamp
Copy link
Contributor

glamp commented Oct 30, 2013

Do you know how to fix it? If so, can you submit a PR?

On Wed, Oct 30, 2013 at 2:47 PM, Tyler Funnell notifications@github.comwrote:

  • minor gridlines
  • grey borders when there should be none
  • outward facing major tick marks on left and bottom borders

The way themes are handled might need to be changed to allow theming of
some plot elements that aren't adjustable through rc params.


Reply to this email directly or view it on GitHubhttps://github.com//issues/85
.

@funnell
Copy link
Author

funnell commented Oct 30, 2013

I can start something but I'm worried it might conflict with the work in #75

@jankatins
Copy link
Contributor

Here are probably some hints how to implement that in rcparams: https://github.com/mwaskom/seaborn/blob/master/seaborn/rcmod.py

@jankatins
Copy link
Contributor

Also here: https://github.com/wrobstory/climatic/blob/master/climatic/stylers.py

    #Only show bottom left ticks, pointing out of axis
    plt.rcParams['xtick.direction'] = 'out'
    plt.rcParams['ytick.direction'] = 'out'
    ax.xaxis.set_ticks_position('bottom')
    ax.yaxis.set_ticks_position('left')

If the last two methods are not available via rcParams, one way to implement this, would be to add a possibility for the themes to submit a callback which would then be called for each axis (see also #93)

@funnell
Copy link
Author

funnell commented Nov 5, 2013

As far as I'm aware at least some of the styling options are not available via rcParams. I think a callback might be the best way to go about this.

@jankatins
Copy link
Contributor

I added a commit to my theming branch, which implementes post_plot_callbacks: #75 -> last commit "Implement post plot callback for theming".

@jankatins
Copy link
Contributor

Whats currently missing is minor gridlines.

@funnell
Copy link
Author

funnell commented Nov 5, 2013

The last link you provided implements minor gridlines this way:

ax.xaxis.set_minor_locator(MultipleLocator( (plt.xticks()[0][1]-plt.xticks()[0][0]) / 2.0 ))
ax.yaxis.set_minor_locator(MultipleLocator( (plt.yticks()[0][1]-plt.yticks()[0][0]) / 2.0 ))

@funnell funnell closed this as completed Dec 15, 2013
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

No branches or pull requests

3 participants