<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There a function for this, but it is note used a lot.<div class=""><br class=""></div><div class="">Here the doc string:</div><div class=""><br class=""><font face="Courier" class="">def ResultsToXY(sets,x,y,foreach=[]):<br class="">    """ combines observable x and y to build a list of DataSet with y vs x<br class=""> <br class="">    this function is used to collect data from a hierarchy of DataSet objects, to prepare plots or evaluation.<br class="">    the inner-most list has to contain one DataSet with props['observable'] = x and one props['observable'] = y,<br class="">    this will be the pair x-y used in the collection.<br class=""><br class="">    The parameters are:<br class="">      sets:    hierarchy of datasets where the inner-most list must contain to pair x-y<br class="">      x:       the name of the observable to be used as x-value of the collected results <br class="">      y:       the name of the observable to be used as y-value of the collected results <br class="">      foreach: an optional list of properties used for grouping the results. A separate DataSet object is created for each unique set of values of the specified parameers.<br class=""><br class="">    The function returns a list of DataSet objects.<br class="">    """<br class=""></font><br class=""></div><div class=""><br class=""></div><div class="">Best,</div><div class="">Michele<br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 28 Mar 2017, at 15:23, Dominik Schildknecht <<a href="mailto:dominik.schildknecht@psi.ch" class="">dominik.schildknecht@psi.ch</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear all,<br class="">I wanted to know if it's already implemented to plot two observables<br class="">against each other with the combination of pyalps.collectXY and<br class="">pyalps.plot.plot.<br class="">As an example I would like to be able to plot energy vs. magnetization<br class="">in an example like MC-07. This mainly arises as a question if I want to<br class="">use the exchange Monte Carlo formalism (thanks for that, it seems to<br class="">work great with very little modification to my code). There the<br class="">optimized temperature set is saved as an observable. If I still want to<br class="">be able to plot M vs. T I would need the ability to plot two observables<br class="">against each other. However it crashes in alps/lib/pyalps/tools.py in<br class="">the function collectXY at the line<br class="">    xvalue = np.array([data.props[x] for i in range(len(data.y))])<br class="">Is what I intend to do possible with collectXY?<br class="">Best,<br class="">Dominik<br class=""><br class="">-- <br class="">Paul Scherrer Institut<br class="">Dominik Schildknecht<br class="">PhD Student<br class="">WHGA/129<br class="">CH-5232 Villigen-PSI<br class="">Phone: +41 56 310 55 68<br class=""><br class=""><br class=""><br class="">----<br class="">Comp-phys-alps-users Mailing List for the ALPS Project<br class=""><a href="http://alps.comp-phys.org/" class="">http://alps.comp-phys.org/</a><br class=""><br class="">List info: https://lists.phys.ethz.ch//listinfo/comp-phys-alps-users<br class="">Archive: https://lists.phys.ethz.ch//pipermail/comp-phys-alps-users<br class=""><br class="">Unsubscribe by writing a mail to comp-phys-alps-users-leave@lists.phys.ethz.ch.<br class=""><br class=""></div></div></blockquote></div><br class=""></div></div></body></html>