Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Changing polygon linestyle?

edited October 2013 in OpenSesame

Does anyone know if polygon line style can be changed? Possibly using Scipy, or Matplotlib? I need to change the line style of certain polygons from "-" to "--", but the function doesn't seem to be built into the polygon object...

Thanks!

Lee

Update: OS won't import Matplotlib, I'm getting an error similar to the one in this discussion.

Comments

  • edited 3:35AM

    Hi Lee,

    There doesn't appear to be a way to easily draw dotted or dashed lines using any of the common drawing toolkits. Matplotlib should be able to do it, and it should be importable in the WinPython OpenSesame package:

    The thing is, though, that matplotlib is really a library for plotting graphs (which is why it has line-style options, of course), and it will be a hassle to use it for drawing polygons in OpenSesame.

    Perhaps you can use a cheap workaround? For example, you could draw a set of vertical lines with the background color on top of your polygon. That way you will kind of get a dashed line.

    Cheers,
    Sebastiaan

  • edited October 2013

    Sebastiaan,

    Thanks for the thoughts - I had hoped that I could use matplotlib.lines and just use the 'set_linestyle' in a similar fashion to the 'set_penwidth' currently available in the canvas - after all, the canvas is surely just a big plotting area??

    However, I hadn't thought of the low-budget version, so much easier! I think I'll go with that then... I can't see any reason why it wouldn't work.

    Thanks,

    Lee

    P.S. would a linestyle option be a future development possibility?

  • edited 3:35AM

    Thanks for the thoughts - I had hoped that I could use matplotlib.lines and just use the 'set_linestyle' in a similar fashion to the 'set_penwidth' currently available in the canvas - after all, the canvas is surely just a big plotting area??

    In principle, yes. What makes it difficult is getting the matplotlib figure onto the OpenSesame canvas. You would probably have to first save it to a file and then have OpenSesame load the image from disk. So it's a hassle-but possible.

    P.S. would a linestyle option be a future development possibility?

    I'm afraid that's unlikely to happen anytime soon, because it would require that all of the libraries used by the various back-ends support this functionality, while none of them currently do.

  • edited 3:35AM

    Okay, that makes sense!

    Best,

    Lee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games