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

add test of all the standard marker symbols #2970

Closed
tacaswell opened this issue Apr 11, 2014 · 4 comments
Closed

add test of all the standard marker symbols #2970

tacaswell opened this issue Apr 11, 2014 · 4 comments
Milestone

Comments

@tacaswell
Copy link
Member

so that #2964 or related does not come back.

This can probably be lifted from the gallery.

@tacaswell tacaswell added this to the v1.4.x milestone Apr 11, 2014
@wuxb45
Copy link

wuxb45 commented Apr 12, 2014

You may adopt this for this comprehensive test :)

#!/usr/bin/python

import matplotlib.pyplot as plt

def x_line_style():
  styles = { \
    '--':'styledashed line style'      , \
    '-.':'styledash-dot line style'    , \
    ':' :'styledotted line style'      , \
    '.' :'stylepoint marker'           , \
    '-,' :'markerpixel marker'          , \
    '-o' :'markercircle marker'         , \
    '-v' :'markertriangle_down marker'  , \
    '-^' :'markertriangle_up marker'    , \
    '-<' :'markertriangle_left marker'  , \
    '->' :'markertriangle_right marker' , \
    '-1' :'markertri_down marker'       , \
    '-2' :'markertri_up marker'         , \
    '-3' :'markertri_left marker'       , \
    '-4' :'markertri_right marker'      , \
    '-s' :'markersquare marker'         , \
    '-p' :'markerpentagon marker'       , \
    '-*' :'markerstar marker'           , \
    '-h' :'markerhexagon1 marker'       , \
    '-H' :'markerhexagon2 marker'       , \
    '-+' :'markerplus marker'           , \
    '-x' :'markerx marker'              , \
    '-D' :'markerdiamond marker'        , \
    '-d' :'markerthin_diamond marker'   , \
    '-|' :'markervline marker'          , \
    '-_' :'markerhline marker'          , \
  }
  fig1, ax1 = plt.subplots(1, 1, figsize=(15,10))
  i = 1
  ax1.set_xlim(0, 10)
  ax1.set_ylim(0, 30)
  for (x,y) in styles.items():
    ax1.plot(range(0,10), [i for j in range(0,10)], (x), label=y, color='r')
    i = i + 1
  ax1.legend(loc=7)
  fig1.savefig('line-style.svg', format='svg')
  plt.close(fig1)

x_line_style()

@tacaswell
Copy link
Member Author

Could you adapt this to be an image test?

See the test files for examples.

@tacaswell
Copy link
Member Author

And drop the legend, image tests work best with out text.

@tacaswell
Copy link
Member Author

closed as #3384 is merged

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

2 participants