You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(14) |
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(16) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(13) |
Feb
(22) |
Mar
(7) |
Apr
(8) |
May
(8) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(31) |
Nov
(23) |
Dec
(3) |
2002 |
Jan
(1) |
Feb
(17) |
Mar
(10) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(11) |
Oct
(5) |
Nov
(21) |
Dec
(20) |
2003 |
Jan
(27) |
Feb
(13) |
Mar
(20) |
Apr
(11) |
May
(12) |
Jun
(7) |
Jul
(16) |
Aug
(21) |
Sep
(9) |
Oct
(28) |
Nov
(24) |
Dec
(30) |
2004 |
Jan
(31) |
Feb
(5) |
Mar
|
Apr
(8) |
May
(12) |
Jun
(7) |
Jul
(13) |
Aug
(12) |
Sep
(2) |
Oct
(14) |
Nov
(42) |
Dec
(14) |
2005 |
Jan
|
Feb
|
Mar
(20) |
Apr
(17) |
May
(9) |
Jun
|
Jul
(7) |
Aug
(3) |
Sep
(17) |
Oct
(14) |
Nov
(9) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
(13) |
Apr
(2) |
May
(46) |
Jun
(2) |
Jul
(20) |
Aug
(26) |
Sep
(31) |
Oct
(5) |
Nov
(9) |
Dec
(13) |
2007 |
Jan
(24) |
Feb
(22) |
Mar
(13) |
Apr
(25) |
May
(25) |
Jun
(9) |
Jul
(20) |
Aug
(9) |
Sep
(26) |
Oct
(3) |
Nov
(4) |
Dec
(3) |
2008 |
Jan
(92) |
Feb
(35) |
Mar
(39) |
Apr
(15) |
May
|
Jun
|
Jul
(18) |
Aug
(5) |
Sep
(5) |
Oct
(7) |
Nov
(10) |
Dec
(27) |
2009 |
Jan
(35) |
Feb
(34) |
Mar
(13) |
Apr
(9) |
May
(18) |
Jun
(9) |
Jul
(15) |
Aug
(13) |
Sep
(64) |
Oct
(7) |
Nov
(43) |
Dec
|
2010 |
Jan
(75) |
Feb
(22) |
Mar
(44) |
Apr
(34) |
May
(47) |
Jun
(77) |
Jul
(28) |
Aug
(7) |
Sep
(45) |
Oct
(1) |
Nov
(19) |
Dec
(7) |
2011 |
Jan
(14) |
Feb
|
Mar
(6) |
Apr
(12) |
May
(19) |
Jun
(3) |
Jul
(8) |
Aug
(4) |
Sep
(3) |
Oct
(21) |
Nov
(11) |
Dec
(4) |
2012 |
Jan
(2) |
Feb
(9) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(5) |
Oct
(1) |
Nov
(18) |
Dec
(2) |
2013 |
Jan
(15) |
Feb
(16) |
Mar
(8) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(17) |
Aug
(3) |
Sep
(17) |
Oct
(43) |
Nov
(25) |
Dec
(9) |
2014 |
Jan
(4) |
Feb
(8) |
Mar
(20) |
Apr
(14) |
May
(49) |
Jun
(1) |
Jul
|
Aug
(18) |
Sep
(2) |
Oct
(1) |
Nov
(22) |
Dec
(3) |
2015 |
Jan
(41) |
Feb
(2) |
Mar
(34) |
Apr
(30) |
May
(14) |
Jun
(17) |
Jul
(29) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
(25) |
Oct
(9) |
Nov
(14) |
Dec
(13) |
2017 |
Jan
(11) |
Feb
(8) |
Mar
(12) |
Apr
(4) |
May
(25) |
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(10) |
Oct
(25) |
Nov
|
Dec
(6) |
2018 |
Jan
(18) |
Feb
(6) |
Mar
(6) |
Apr
(1) |
May
(7) |
Jun
(13) |
Jul
(8) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(17) |
Dec
(3) |
2019 |
Jan
(11) |
Feb
(4) |
Mar
(13) |
Apr
(19) |
May
(1) |
Jun
(2) |
Jul
(8) |
Aug
(4) |
Sep
(32) |
Oct
(51) |
Nov
(1) |
Dec
(9) |
2020 |
Jan
(9) |
Feb
(6) |
Mar
|
Apr
|
May
(3) |
Jun
(2) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
|
2022 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Hazen B. <hba...@ma...> - 2016-11-15 01:05:33
|
On 09/23/2016 06:29 AM, Tom Schoonjans wrote: > Moving the git repository to Github itself would be trivial. Just > use https://github.com/new/import, but I do recommend using the PLplot > organization as owner. Just add yourself to it first and get sufficient > privileges. Hazen I think you would be able to help out here since you > seem to be in charge of this organization. I have transferred my personal PLplot github mirror to the PLplot organization (Hezekiah and are currently the only members): https://github.com/PLplot/PLplot Now I would like to add some things into master that I think would be of some benefit to the project, but are primarily there specifically for Github. (1) A README.md file. This would have a short project description as well as links to the SF site, the documentation, etc. as well as some badges (see (2) below). (2) Some .yml files, for example, one to provide "continuous" testing using Travis-CI (.travis.yml). Thoughts? Is this Ok? -Hazen |
From: Pedro V. <ped...@sp...> - 2016-10-12 04:42:24
|
one detail I am using a statically built Qt version this can be done with git clone https://code.qt.io/qt/qt5.git qt-everywhere-opensource-src-5.5.1 cd qt-everywhere-opensource-src-5.5.1 git checkout 5.5 perl init-repository --module-subset=qtbase,qtimageformats,-qtwebkit,-qtwebkit-examples,-qtwebengine git checkout v5.5.1 cd qtimageformats && git checkout v5.5.1 && cd .. configure -prefix I:/qt-win32-msvc2015 -debug -static -static-runtime -platform win32-msvc2015 -confirm-license -nomake examples -no-compile-examples -nomake tests -no-opengl jom -j 4 nmake install also these changes have to be made for msvc-desktop.conf QMAKE_CFLAGS_DEBUG = -Zi -MTd QMAKE_CFLAGS_RELEASE = -O2 -MT ----- Original Message ----- From: Pedro Vicente To: plp...@li... ; plp...@li... Sent: Tuesday, October 11, 2016 10:08 PM Subject: [Plplot-general] cmake error Qt build Hi I get an error build with Qt driver, the call and error are below The home page documenation seems not to have much information about all the cmake options . this is probably the most complex cmake build system I have ever found, and without documenation makes it difficult to use. Would it be possible to add some simple usage ? thanks using Windows Visual Studio 2015 Qt version 5.5.1 PLpot version 5.11.1 call used: cmake ".." -G "Visual Studio 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF -DSTATIC_RUNTIME:BOOL=ON -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF -DANY_QT_DEVICE:BOOL=ON -DPLPLOT_USE_QT5:BOOL=ON -DPLPLOT_USE_QT5=ON -DDEFAULT_ALL_DEVICES=ON relevant output relevant to Qt and error seems to be DEFAULT_NO_BINDINGS=OFF ENABLE_qt= PLPLOT_USE_QT5=ON ENABLE_pyqt4= -- Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript PLPLOT_USE_QT5=ON -- Qt5_library_fullpath_list = I:/qt-win32-msvc2015/lib/Qt5Cored.lib;I:/qt-win32-msvc2015/lib/Qt5Guid.lib;I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib;I:/qt -win32-msvc2015/lib/Qt5Widgetsd.lib;I:/qt-win32-msvc2015/lib/Qt5Svgd.lib -- Qt5_library_LINK_FLAGS = I:/qt-win32-msvc2015/lib/Qt5Cored.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-wi n32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib ANY_QT_DEVICE=ON -- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt4 to OFF. CMake Error at src/CMakeLists.txt:314 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "plplot". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the plain signature are here: * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries) libplplot_LINK_FLAGS = C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/Gdi32.Lib;C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/ComDlg 32.Lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxbase31ud.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxmsw31ud_core.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxpngd.lib;M:/wx/ wxwidgets-3.1.0/lib/vc_lib/wxtiffd.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxjpegd.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxzlibd.lib;M:/wx/wxwidgets-3.1.0/lib/vc _lib/wxregexud.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxexpatd.lib;winmm;comctl32;rpcrt4;wsock32;-lcsirocsa;-lnistcd;-lqsastime;I:/qt-win32-msvc2015/lib/Qt5Cor ed.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Q t5Svgd.lib -- WARNING: Perl modules XML::Parser and/or XML::DOM not available so cannot check that swig_documentation.i is up to date. CMake Error at bindings/qt_gui/CMakeLists.txt:56 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "plplotqt". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the plain signature are here: * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries) ---------------------- Pedro Vicente ped...@sp... http://www.space-research.org/ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ------------------------------------------------------------------------------ _______________________________________________ Plplot-general mailing list Plp...@li... https://lists.sourceforge.net/lists/listinfo/plplot-general |
From: Pedro V. <ped...@sp...> - 2016-10-12 02:08:54
|
Hi I get an error build with Qt driver, the call and error are below The home page documenation seems not to have much information about all the cmake options . this is probably the most complex cmake build system I have ever found, and without documenation makes it difficult to use. Would it be possible to add some simple usage ? thanks using Windows Visual Studio 2015 Qt version 5.5.1 PLpot version 5.11.1 call used: cmake ".." -G "Visual Studio 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF -DSTATIC_RUNTIME:BOOL=ON -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF -DANY_QT_DEVICE:BOOL=ON -DPLPLOT_USE_QT5:BOOL=ON -DPLPLOT_USE_QT5=ON -DDEFAULT_ALL_DEVICES=ON relevant output relevant to Qt and error seems to be DEFAULT_NO_BINDINGS=OFF ENABLE_qt= PLPLOT_USE_QT5=ON ENABLE_pyqt4= -- Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript PLPLOT_USE_QT5=ON -- Qt5_library_fullpath_list = I:/qt-win32-msvc2015/lib/Qt5Cored.lib;I:/qt-win32-msvc2015/lib/Qt5Guid.lib;I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib;I:/qt -win32-msvc2015/lib/Qt5Widgetsd.lib;I:/qt-win32-msvc2015/lib/Qt5Svgd.lib -- Qt5_library_LINK_FLAGS = I:/qt-win32-msvc2015/lib/Qt5Cored.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-wi n32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib ANY_QT_DEVICE=ON -- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt4 to OFF. CMake Error at src/CMakeLists.txt:314 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "plplot". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the plain signature are here: * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries) libplplot_LINK_FLAGS = C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/Gdi32.Lib;C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/ComDlg 32.Lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxbase31ud.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxmsw31ud_core.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxpngd.lib;M:/wx/ wxwidgets-3.1.0/lib/vc_lib/wxtiffd.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxjpegd.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxzlibd.lib;M:/wx/wxwidgets-3.1.0/lib/vc _lib/wxregexud.lib;M:/wx/wxwidgets-3.1.0/lib/vc_lib/wxexpatd.lib;winmm;comctl32;rpcrt4;wsock32;-lcsirocsa;-lnistcd;-lqsastime;I:/qt-win32-msvc2015/lib/Qt5Cor ed.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Q t5Svgd.lib -- WARNING: Perl modules XML::Parser and/or XML::DOM not available so cannot check that swig_documentation.i is up to date. CMake Error at bindings/qt_gui/CMakeLists.txt:56 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "plplotqt". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the plain signature are here: * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries) ---------------------- Pedro Vicente ped...@sp... http://www.space-research.org/ |
From: Phil R. <p.d...@gm...> - 2016-10-10 12:12:30
|
Hi Pedro Glad you have things working. I believe Alan is close to having a new release of Plplot so I'm not sure if now is a suitable time to introduce new features, but I will add overloads of the Create function to my to do list for early in the next release cycle. Regarding the old version. There are very significant behind the scenes changes to help with code management. The old device is no longer being actively worked on. The driver for putting things in a template is that it means that you can have a plplot window based on any kind of wxWindow. Of course most often we create a wxPanel, but the example uses a wxFrame as does your code and if you really wanted you could create a wxPLplotwindow<wxButton> or if someone in the future generated a wxAcceleratedGraphicsWindow that used OpenGL then I guess that could be rendered to as well - or at least it wouldn't mean an API change to make use of it. Phil On 9 October 2016 at 06:19, Pedro Vicente <ped...@sp...> wrote: > Hi Phil > >> Traditionally colour 0 has always been the background colour, so >> plscol0 passing in colour 0 is the same as plscolbg. You should use >> plcol(1) or upwards for rendering. > > > ok, I understand now, it seems it was just me trying to redefine color index > 0 2 times , and there is no need to > > this code worked for me (white background with color 0, black plot with > color 1) > > bool wxAppPlot::OnInit() > { > wx_PLplotwindow<wxFrame> *frame = new wx_PLplotwindow<wxFrame>(); > frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), > wxDefaultPosition, > wxSize(900, 700)); > frame->Show(); > > wx_PLplotstream* pls = frame->GetStream(); > pls->init(); > > pls->adv(0); > pls->scol0(0, 255, 255, 255); > pls->clear(); > pls->scol0(1, 0, 0, 0); > > //render > > plot_window(frame); > return true; > } > > Note here that I am using my modified version "wx_PLplotstream" that does > not call > init(); > > but I am calling init(); right at start , so this is the same I think of > using the regular class "wxPLplotstream" > > so, my confusion came because I was convinced that to modify the background, > this had to be done *before* calling > init(); > > but it seems we don't have to do it that way, is that right ? > > the documenation says that it is needed > > http://plplot.sourceforge.net/docbook-manual/plplot-html-5.11.1/color.html > > "There are a number of options for changing the default red on black colors. > The user may set the index 0 background color using the command-line bg > parameter or by calling plscolbg (or plscol0 with a 0 index) before plinit. > During the course of the plot, the user can change the foreground color as > often as desired using plcol0 to select the index of the desired color. " > > or is just this sequence of calls that makes it not necessary to do it > before init() ? > > pls->adv(0); > pls->scol0(0, 255, 255, 255); > pls->clear(); > pls->scol0(1, 0, 0, 0); > > >> I don't think I can or should remove the plinit call in >> wxPLstream::Create because I think that has been there a long time and >> would break other users' existing code. > > > ok, understood, that makes sense , yes > >> However I could overload the >> Create function so that it accepts some extra initialisation variables >> such as background colour. > > > > that would be a must have if the only way to change the background was to do > it before init() > but since it seems that is not needed so not really a must have > > but maybe there are other things that can only be done before init() > > by the way, I have a small request , is that possible to keep the > "deprecated" wxWidgets classes around? > > it seems the only difference is that new wxWidgets is the use of templates > as in > > template< class WXWINDOW > > void plot_window(wx_PLplotwindow<WXWINDOW> *plotwindow); > > my experience with templates is that they make the code more difficult to > track and find bugs > > Maybe merge the "deprecated" wxWidgets and the new one just into one file or > class and give the option to use either one (don't know > if this makes sense) > > > > -Pedro > > > > ----- Original Message ----- From: "Phil Rosenberg" > <p.d...@gm...> > To: "Pedro Vicente" <ped...@sp...> > Cc: <plp...@li...>; > <plp...@li...> > Sent: Friday, October 07, 2016 7:51 AM > > Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change > thedefault blackbackground > > >> Hi Pedro >> Traditionally colour 0 has always been the background colour, so >> plscol0 passing in colour 0 is the same as plscolbg. You should use >> plcol(1) or upwards for rendering. In some ways it is up to you how >> you do that. You can either set up you pallet at the beginning using >> plscol0 or plscsol0a then use plcol0(1), plcol0(2) etc, or you can >> just always use plscol0(1), but use repeated calls to plscol0 or >> plscol0a to keep changing colour 1. >> >> Do you happen to call plenv() after setting colour 0 to black again? I >> have a feeling that plenv() may clear the page again. But I'm not >> sure. If you are still haing problems using colours 1 and above for >> drawing then let us know and I'll have a further look. >> >> I don't think I can or should remove the plinit call in >> wxPLstream::Create because I think that has been there a long time and >> would break other users' existing code. However I could overload the >> Create function so that it accepts some extra initialisation variables >> such as background colour. >> >> Phil >> >> On 6 October 2016 at 16:41, Pedro Vicente >> <ped...@sp...> wrote: >>> >>> Phil >>> >>> >>> I believe there is stiil an issue with this solution >>> >>> my sample worked because I had >>> >>> plcol0(8); >>> >>> that does the plot in brown color >>> >>> if I try to plot in black color (on white bacground now) by doing >>> >>> plcol0(0); >>> >>> then I have no plot, since color 0 is now white >>> >>> is there a way with this solution to define color 0 as black for the >>> plot? >>> >>> I tried to call >>> >>> plscol0(0, 0, 0, 0); >>> >>> as >>> >>> wxPLplotstream* pls = plotwindow->GetStream(); >>> pls->adv(0); >>> pls->scolbg(255, 255, 255); >>> pls->clear(); >>> plscol0(0, 0, 0, 0); >>> >>> but like this I have the default red on black again >>> >>> >>> for now, the way I was able to have the black on white background was to >>> replicate all the code >>> of >>> wxPLplotwindow >>> wxPLplotwindow >>> >>> into new classes , giving them another name, commenting the init() call >>> on >>> them and then >>> doing this code (note that the classes are renamed to wx_PLplotwindow and >>> wx_PLplotstream) >>> >>> >>> >>> >>> bool wxAppPlot::OnInit() >>> { >>> wx_PLplotwindow<wxFrame> *frame = new wx_PLplotwindow<wxFrame>(); >>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>> wxDefaultPosition, >>> wxSize(900, 700)); >>> frame->Show(); >>> >>> //set background color (0) to white RGB(255,255,255) >>> //must be called before plinit() >>> plscolbg(255, 255, 255); >>> >>> wx_PLplotstream* pls = frame->GetStream(); >>> pls->init(); >>> >>> //change color (0) to black RGB(0, 0, 0) >>> //must be called after plinit() >>> plscol0(0, 0, 0, 0); >>> >>> Plot(frame); >>> return true; >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> //Plot >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> template< class WXWINDOW > >>> void Plot(wx_PLplotwindow<WXWINDOW> *plotwindow) >>> { >>> wx_PLplotstream* pls = plotwindow->GetStream(); >>> >>> //render >>> const int NSIZE = 101; >>> PLFLT x[NSIZE], y[NSIZE]; >>> PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; >>> >>> for (int i = 0; i < NSIZE; i++) >>> { >>> x[i] = i; >>> y[i] = 5; >>> } >>> >>> plschr(0, 1.0); >>> plcol0(0); >>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>> pllab("x", "y", "Label"); >>> plpoin(NSIZE, x, y, 46); >>> >>> plotwindow->RenewPlot(); >>> } >>> >>> >>> >>> >>> ----- Original Message ----- From: "Pedro Vicente" >>> <ped...@sp...> >>> To: "Phil Rosenberg" <p.d...@gm...> >>> Cc: <plp...@li...>; >>> <plp...@li...> >>> Sent: Thursday, October 06, 2016 10:44 AM >>> >>> Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change >>> thedefault blackbackground >>> >>> >>>> Hi Phil, Alan >>>> >>>> This solution worked for me, thanks >>>> >>>> >>>>> The easiest way to do this at the moment is something like >>>>> >>>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>>> pls->adv( 0 ); >>>>> pls->scolbg(255, 255, 255); >>>>> pls->clear(); >>>>> //rest of your plotting code >>>> >>>> >>>> >>>> >>>> >>>>> I'm very open to better ways >>>>> to do this if you have suggestions. >>>> >>>> >>>> >>>> The only suggestion I have is the one I sent on my previous mail, that >>>> was *not* to have >>>> >>>> wxPLplotstream::Create >>>> >>>> call >>>> >>>> init() >>>> >>>> and let the user do that on his application. >>>> >>>> >>>> By looking at the samples, I believe they all call plinit() at start, >>>> >>>> >>>> >>>> my complete test code is now >>>> >>>> >>>> #include "wx/wxprec.h" >>>> #include "wx/wx.h" >>>> #include "wxPLplotwindow.h" >>>> >>>> template< class WXWINDOW > >>>> void Plot(wxPLplotwindow<WXWINDOW> *plotwindow); >>>> >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> //wxAppPlot >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> class wxAppPlot : public wxApp >>>> { >>>> public: >>>> virtual bool OnInit(); >>>> }; >>>> >>>> IMPLEMENT_APP(wxAppPlot) >>>> >>>> bool wxAppPlot::OnInit() >>>> { >>>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>>> wxDefaultPosition, >>>> wxSize(900, 700)); >>>> frame->Show(); >>>> Plot(frame); >>>> return true; >>>> } >>>> >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> //Plot >>>> >>>> >>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>> >>>> template< class WXWINDOW > >>>> void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >>>> { >>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>> pls->adv(0); >>>> pls->scolbg(255, 255, 255); >>>> pls->clear(); >>>> >>>> //render >>>> >>>> const int NSIZE = 101; >>>> PLFLT x[NSIZE], y[NSIZE]; >>>> PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; >>>> >>>> for (int i = 0; i < NSIZE; i++) >>>> { >>>> x[i] = i; >>>> y[i] = 5; >>>> } >>>> >>>> plschr(0, 1.0); >>>> plcol0(8); >>>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>>> pllab("x", "y", "Label"); >>>> plpoin(NSIZE, x, y, 46); >>>> >>>> plotwindow->RenewPlot(); >>>> } >>>> >>>> >>>> -Pedro >>>> >>>> ----- Original Message ----- From: "Phil Rosenberg" >>>> <p.d...@gm...> >>>> To: "Pedro Vicente" <ped...@sp...> >>>> Cc: <plp...@li...>; >>>> <plp...@li...> >>>> Sent: Thursday, October 06, 2016 5:55 AM >>>> Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change >>>> the >>>> default blackbackground >>>> >>>> >>>>> Hi Pedro >>>>> The easiest way to do this at the moment is something like >>>>> >>>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>>> pls->adv( 0 ); >>>>> pls->scolbg(255, 255, 255); >>>>> pls->clear(); >>>>> //rest of your plotting code >>>>> >>>>> If you have multiple subpages then you will need to do this on each >>>>> page. Also if your subpages don't cover all the windows then you can >>>>> call the SetBackgroundColour method of wxPLplotwindow and this will >>>>> clear the whole window to the given colour initially. >>>>> >>>>> Hope that helps. If not then let me know. I'm very open to better ways >>>>> to do this if you have suggestions. >>>>> >>>>> Phil >>>>> >>>>> >>>>> On 6 October 2016 at 06:00, Pedro Vicente >>>>> <ped...@sp...> wrote: >>>>>> >>>>>> >>>>>> >>>>>> so, there are at least 2 solutions for this : >>>>>> 1) the quick is just to modify the PLplot source code , in the call to >>>>>> >>>>>> void wxPLplotstream::Create >>>>>> >>>>>> comment the call to >>>>>> >>>>>> //init(); >>>>>> >>>>>> then in our app code , do the init() call after Create() . as >>>>>> >>>>>> ~~~ >>>>>> bool wxAppPlot::OnInit() >>>>>> { >>>>>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>>>>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>>>>> wxDefaultPosition, >>>>>> wxSize(900, 700)); >>>>>> frame->Show(); >>>>>> >>>>>> //set background color (0) to white RGB(255,255,255) >>>>>> //must be called before plinit() >>>>>> plscolbg(255, 255, 255); >>>>>> >>>>>> wxPLplotstream* pls = frame->GetStream(); >>>>>> pls->init(); >>>>>> >>>>>> //change color (0) to black RGB(0, 0, 0) >>>>>> //must be called after plinit() >>>>>> plscol0(0, 0, 0, 0); >>>>>> >>>>>> Plot(frame); >>>>>> return true; >>>>>> } >>>>>> ~~~ >>>>>> >>>>>> >>>>>> since it seems the only way to modiy the background color is to do the >>>>>> above >>>>>> sequence >>>>>> this is a change that I recommend to be included in the libray, since >>>>>> I >>>>>> believe the other drivers require a call to init() too, but not the >>>>>> wxWidgets driver. >>>>>> >>>>>> 2) not modifying the source code. In this case , I think it should be >>>>>> possible to derive 2 classes , >>>>>> a) one from wxPLplotwindow >>>>>> b) other from wxPLplotwindow >>>>>> >>>>>> then do everything in those classes as now except the call to init() >>>>>> >>>>>> >>>>>> but if the developers could do option 1) that probably would be the >>>>>> best >>>>>> thanks >>>>>> >>>>>> >>>>>> -Pedro >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: Pedro Vicente >>>>>> To: plp...@li... >>>>>> Sent: Wednesday, October 05, 2016 6:42 PM >>>>>> Subject: [Plplot-general] wxWidgets driver -- change the default >>>>>> blackbackground >>>>>> >>>>>> Hi >>>>>> >>>>>> >>>>>> I am trying to change the default black background color using the >>>>>> wxWidgets >>>>>> driver >>>>>> >>>>>> If using the SVG driver this can be done as explained here >>>>>> >>>>>> https://sourceforge.net/p/plplot/mailman/message/2817799/ >>>>>> >>>>>> the trick being calling >>>>>> >>>>>> plscolbg() >>>>>> >>>>>> before >>>>>> >>>>>> plinit(); >>>>>> >>>>>> like the sample code below marked "SVG Driver" does >>>>>> >>>>>> >>>>>> However for the wxWidegts driver , it seems we do not do a call to >>>>>> >>>>>> plinit(); >>>>>> >>>>>> but rather this is done inside the C++ stream initialization >>>>>> >>>>>> From the wxWidgets PLplot sample below >>>>>> >>>>>> the >>>>>> >>>>>> plinit(); >>>>>> >>>>>> is made inside >>>>>> >>>>>> >>>>>> >>>>>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); >>>>>> >>>>>> >>>>>> so I don't find a way to call the plscolbg() function before >>>>>> >>>>>> >>>>>> How can this be accomplished ? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> I also tried to modify the default colors of the default palette >>>>>> >>>>>> cmap0_default.pal >>>>>> >>>>>> 16 >>>>>> #000000 >>>>>> >>>>>> so that the first is white >>>>>> >>>>>> this does work *but* only after the window is redrawn (it first shows >>>>>> the >>>>>> default red on black); >>>>>> this seems like a bug to me >>>>>> >>>>>> >>>>>> Also, what's the call to increase the font size? >>>>>> On the wxWidgets driver the font looks tiny >>>>>> >>>>>> Thanks ! >>>>>> >>>>>> >>>>>> Sample code wxWidgets >>>>>> >>>>>> >>>>>> >>>>>> bool >>>>>> >>>>>> wxAppPlot::OnInit() >>>>>> >>>>>> { >>>>>> >>>>>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>>>>> >>>>>> frame->Create( >>>>>> >>>>>> NULL, wxID_ANY, wxT("wxPLplot")); >>>>>> >>>>>> frame->Show(); >>>>>> >>>>>> Plot(frame); >>>>>> >>>>>> return true; >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //Plot >>>>>> >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> template >>>>>> >>>>>> < class WXWINDOW > >>>>>> >>>>>> void >>>>>> >>>>>> Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >>>>>> >>>>>> { >>>>>> >>>>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>>>> >>>>>> //render >>>>>> >>>>>> plotwindow->RenewPlot(); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Sample code SVG driver >>>>>> >>>>>> void >>>>>> >>>>>> atms_dwell_granu_t::plot() >>>>>> >>>>>> { >>>>>> >>>>>> //set SVG device and output file name >>>>>> >>>>>> plsdev("svg"); >>>>>> >>>>>> plsfnam("atms_dwell_granu.svg"); >>>>>> >>>>>> //set background color (0) to white RGB(255,255,255) >>>>>> >>>>>> //must be called before plinit() >>>>>> >>>>>> plscolbg(255, 255, 255); >>>>>> >>>>>> //initialize plplot >>>>>> >>>>>> plinit(); >>>>>> >>>>>> //change color (0) to black RGB(0, 0, 0) >>>>>> >>>>>> //must be called after plinit() >>>>>> >>>>>> plscol0(0, 0, 0, 0); >>>>>> >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> //render >>>>>> >>>>>> >>>>>> >>>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>>> >>>>>> PLFLT xmin, xmax, ymin, ymax; >>>>>> >>>>>> PLFLT *x, *y; >>>>>> >>>>>> const int NSIZE = iOrbit_all; >>>>>> >>>>>> xmin = 0; >>>>>> >>>>>> xmax = NSIZE; >>>>>> >>>>>> ymin = -1.0; >>>>>> >>>>>> ymax = 6.0; >>>>>> >>>>>> x = >>>>>> >>>>>> new PLFLT[NSIZE]; >>>>>> >>>>>> y = >>>>>> >>>>>> new PLFLT[NSIZE]; >>>>>> >>>>>> plcol0(0); >>>>>> >>>>>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>>>>> >>>>>> pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); >>>>>> >>>>>> //time axis >>>>>> >>>>>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>>>>> >>>>>> { >>>>>> >>>>>> x[idx_orb] = idx_orb; >>>>>> >>>>>> } >>>>>> >>>>>> //mean >>>>>> >>>>>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>>>>> >>>>>> { >>>>>> >>>>>> y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - >>>>>> 1][idx_orb]; >>>>>> >>>>>> } >>>>>> >>>>>> plpoin(NSIZE, x, y, 46); >>>>>> >>>>>> plend(); >>>>>> >>>>>> delete[] x; >>>>>> >>>>>> delete[] y; >>>>>> >>>>>> } >>>>>> >>>>>> ________________________________ >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>>>> >>>>>> ________________________________ >>>>>> >>>>>> _______________________________________________ >>>>>> Plplot-general mailing list >>>>>> Plp...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/plplot-general >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>>>> _______________________________________________ >>>>>> Plplot-devel mailing list >>>>>> Plp...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/plplot-devel >>>>>> >>>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Plplot-devel mailing list >>>> Plp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/plplot-devel >>>> >>> >> > |
From: Pedro V. <ped...@sp...> - 2016-10-09 05:19:44
|
Hi Phil > Traditionally colour 0 has always been the background colour, so >plscol0 passing in colour 0 is the same as plscolbg. You should use >plcol(1) or upwards for rendering. ok, I understand now, it seems it was just me trying to redefine color index 0 2 times , and there is no need to this code worked for me (white background with color 0, black plot with color 1) bool wxAppPlot::OnInit() { wx_PLplotwindow<wxFrame> *frame = new wx_PLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), wxDefaultPosition, wxSize(900, 700)); frame->Show(); wx_PLplotstream* pls = frame->GetStream(); pls->init(); pls->adv(0); pls->scol0(0, 255, 255, 255); pls->clear(); pls->scol0(1, 0, 0, 0); //render plot_window(frame); return true; } Note here that I am using my modified version "wx_PLplotstream" that does not call init(); but I am calling init(); right at start , so this is the same I think of using the regular class "wxPLplotstream" so, my confusion came because I was convinced that to modify the background, this had to be done *before* calling init(); but it seems we don't have to do it that way, is that right ? the documenation says that it is needed http://plplot.sourceforge.net/docbook-manual/plplot-html-5.11.1/color.html "There are a number of options for changing the default red on black colors. The user may set the index 0 background color using the command-line bg parameter or by calling plscolbg (or plscol0 with a 0 index) before plinit. During the course of the plot, the user can change the foreground color as often as desired using plcol0 to select the index of the desired color. " or is just this sequence of calls that makes it not necessary to do it before init() ? pls->adv(0); pls->scol0(0, 255, 255, 255); pls->clear(); pls->scol0(1, 0, 0, 0); > I don't think I can or should remove the plinit call in > wxPLstream::Create because I think that has been there a long time and > would break other users' existing code. ok, understood, that makes sense , yes >However I could overload the > Create function so that it accepts some extra initialisation variables > such as background colour. that would be a must have if the only way to change the background was to do it before init() but since it seems that is not needed so not really a must have but maybe there are other things that can only be done before init() by the way, I have a small request , is that possible to keep the "deprecated" wxWidgets classes around? it seems the only difference is that new wxWidgets is the use of templates as in template< class WXWINDOW > void plot_window(wx_PLplotwindow<WXWINDOW> *plotwindow); my experience with templates is that they make the code more difficult to track and find bugs Maybe merge the "deprecated" wxWidgets and the new one just into one file or class and give the option to use either one (don't know if this makes sense) -Pedro ----- Original Message ----- From: "Phil Rosenberg" <p.d...@gm...> To: "Pedro Vicente" <ped...@sp...> Cc: <plp...@li...>; <plp...@li...> Sent: Friday, October 07, 2016 7:51 AM Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change thedefault blackbackground > Hi Pedro > Traditionally colour 0 has always been the background colour, so > plscol0 passing in colour 0 is the same as plscolbg. You should use > plcol(1) or upwards for rendering. In some ways it is up to you how > you do that. You can either set up you pallet at the beginning using > plscol0 or plscsol0a then use plcol0(1), plcol0(2) etc, or you can > just always use plscol0(1), but use repeated calls to plscol0 or > plscol0a to keep changing colour 1. > > Do you happen to call plenv() after setting colour 0 to black again? I > have a feeling that plenv() may clear the page again. But I'm not > sure. If you are still haing problems using colours 1 and above for > drawing then let us know and I'll have a further look. > > I don't think I can or should remove the plinit call in > wxPLstream::Create because I think that has been there a long time and > would break other users' existing code. However I could overload the > Create function so that it accepts some extra initialisation variables > such as background colour. > > Phil > > On 6 October 2016 at 16:41, Pedro Vicente > <ped...@sp...> wrote: >> Phil >> >> >> I believe there is stiil an issue with this solution >> >> my sample worked because I had >> >> plcol0(8); >> >> that does the plot in brown color >> >> if I try to plot in black color (on white bacground now) by doing >> >> plcol0(0); >> >> then I have no plot, since color 0 is now white >> >> is there a way with this solution to define color 0 as black for the >> plot? >> >> I tried to call >> >> plscol0(0, 0, 0, 0); >> >> as >> >> wxPLplotstream* pls = plotwindow->GetStream(); >> pls->adv(0); >> pls->scolbg(255, 255, 255); >> pls->clear(); >> plscol0(0, 0, 0, 0); >> >> but like this I have the default red on black again >> >> >> for now, the way I was able to have the black on white background was to >> replicate all the code >> of >> wxPLplotwindow >> wxPLplotwindow >> >> into new classes , giving them another name, commenting the init() call >> on >> them and then >> doing this code (note that the classes are renamed to wx_PLplotwindow and >> wx_PLplotstream) >> >> >> >> >> bool wxAppPlot::OnInit() >> { >> wx_PLplotwindow<wxFrame> *frame = new wx_PLplotwindow<wxFrame>(); >> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >> wxDefaultPosition, >> wxSize(900, 700)); >> frame->Show(); >> >> //set background color (0) to white RGB(255,255,255) >> //must be called before plinit() >> plscolbg(255, 255, 255); >> >> wx_PLplotstream* pls = frame->GetStream(); >> pls->init(); >> >> //change color (0) to black RGB(0, 0, 0) >> //must be called after plinit() >> plscol0(0, 0, 0, 0); >> >> Plot(frame); >> return true; >> } >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> //Plot >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> template< class WXWINDOW > >> void Plot(wx_PLplotwindow<WXWINDOW> *plotwindow) >> { >> wx_PLplotstream* pls = plotwindow->GetStream(); >> >> //render >> const int NSIZE = 101; >> PLFLT x[NSIZE], y[NSIZE]; >> PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; >> >> for (int i = 0; i < NSIZE; i++) >> { >> x[i] = i; >> y[i] = 5; >> } >> >> plschr(0, 1.0); >> plcol0(0); >> plenv(xmin, xmax, ymin, ymax, 0, 0); >> pllab("x", "y", "Label"); >> plpoin(NSIZE, x, y, 46); >> >> plotwindow->RenewPlot(); >> } >> >> >> >> >> ----- Original Message ----- From: "Pedro Vicente" >> <ped...@sp...> >> To: "Phil Rosenberg" <p.d...@gm...> >> Cc: <plp...@li...>; >> <plp...@li...> >> Sent: Thursday, October 06, 2016 10:44 AM >> >> Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change >> thedefault blackbackground >> >> >>> Hi Phil, Alan >>> >>> This solution worked for me, thanks >>> >>> >>>> The easiest way to do this at the moment is something like >>>> >>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>> pls->adv( 0 ); >>>> pls->scolbg(255, 255, 255); >>>> pls->clear(); >>>> //rest of your plotting code >>> >>> >>> >>> >>>> I'm very open to better ways >>>> to do this if you have suggestions. >>> >>> >>> The only suggestion I have is the one I sent on my previous mail, that >>> was *not* to have >>> >>> wxPLplotstream::Create >>> >>> call >>> >>> init() >>> >>> and let the user do that on his application. >>> >>> >>> By looking at the samples, I believe they all call plinit() at start, >>> >>> >>> >>> my complete test code is now >>> >>> >>> #include "wx/wxprec.h" >>> #include "wx/wx.h" >>> #include "wxPLplotwindow.h" >>> >>> template< class WXWINDOW > >>> void Plot(wxPLplotwindow<WXWINDOW> *plotwindow); >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> //wxAppPlot >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> class wxAppPlot : public wxApp >>> { >>> public: >>> virtual bool OnInit(); >>> }; >>> >>> IMPLEMENT_APP(wxAppPlot) >>> >>> bool wxAppPlot::OnInit() >>> { >>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>> wxDefaultPosition, >>> wxSize(900, 700)); >>> frame->Show(); >>> Plot(frame); >>> return true; >>> } >>> >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> //Plot >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> template< class WXWINDOW > >>> void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >>> { >>> wxPLplotstream* pls = plotwindow->GetStream(); >>> pls->adv(0); >>> pls->scolbg(255, 255, 255); >>> pls->clear(); >>> >>> //render >>> >>> const int NSIZE = 101; >>> PLFLT x[NSIZE], y[NSIZE]; >>> PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; >>> >>> for (int i = 0; i < NSIZE; i++) >>> { >>> x[i] = i; >>> y[i] = 5; >>> } >>> >>> plschr(0, 1.0); >>> plcol0(8); >>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>> pllab("x", "y", "Label"); >>> plpoin(NSIZE, x, y, 46); >>> >>> plotwindow->RenewPlot(); >>> } >>> >>> >>> -Pedro >>> >>> ----- Original Message ----- From: "Phil Rosenberg" >>> <p.d...@gm...> >>> To: "Pedro Vicente" <ped...@sp...> >>> Cc: <plp...@li...>; >>> <plp...@li...> >>> Sent: Thursday, October 06, 2016 5:55 AM >>> Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change >>> the >>> default blackbackground >>> >>> >>>> Hi Pedro >>>> The easiest way to do this at the moment is something like >>>> >>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>> pls->adv( 0 ); >>>> pls->scolbg(255, 255, 255); >>>> pls->clear(); >>>> //rest of your plotting code >>>> >>>> If you have multiple subpages then you will need to do this on each >>>> page. Also if your subpages don't cover all the windows then you can >>>> call the SetBackgroundColour method of wxPLplotwindow and this will >>>> clear the whole window to the given colour initially. >>>> >>>> Hope that helps. If not then let me know. I'm very open to better ways >>>> to do this if you have suggestions. >>>> >>>> Phil >>>> >>>> >>>> On 6 October 2016 at 06:00, Pedro Vicente >>>> <ped...@sp...> wrote: >>>>> >>>>> >>>>> so, there are at least 2 solutions for this : >>>>> 1) the quick is just to modify the PLplot source code , in the call to >>>>> >>>>> void wxPLplotstream::Create >>>>> >>>>> comment the call to >>>>> >>>>> //init(); >>>>> >>>>> then in our app code , do the init() call after Create() . as >>>>> >>>>> ~~~ >>>>> bool wxAppPlot::OnInit() >>>>> { >>>>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>>>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>>>> wxDefaultPosition, >>>>> wxSize(900, 700)); >>>>> frame->Show(); >>>>> >>>>> //set background color (0) to white RGB(255,255,255) >>>>> //must be called before plinit() >>>>> plscolbg(255, 255, 255); >>>>> >>>>> wxPLplotstream* pls = frame->GetStream(); >>>>> pls->init(); >>>>> >>>>> //change color (0) to black RGB(0, 0, 0) >>>>> //must be called after plinit() >>>>> plscol0(0, 0, 0, 0); >>>>> >>>>> Plot(frame); >>>>> return true; >>>>> } >>>>> ~~~ >>>>> >>>>> >>>>> since it seems the only way to modiy the background color is to do the >>>>> above >>>>> sequence >>>>> this is a change that I recommend to be included in the libray, since >>>>> I >>>>> believe the other drivers require a call to init() too, but not the >>>>> wxWidgets driver. >>>>> >>>>> 2) not modifying the source code. In this case , I think it should be >>>>> possible to derive 2 classes , >>>>> a) one from wxPLplotwindow >>>>> b) other from wxPLplotwindow >>>>> >>>>> then do everything in those classes as now except the call to init() >>>>> >>>>> >>>>> but if the developers could do option 1) that probably would be the >>>>> best >>>>> thanks >>>>> >>>>> >>>>> -Pedro >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Pedro Vicente >>>>> To: plp...@li... >>>>> Sent: Wednesday, October 05, 2016 6:42 PM >>>>> Subject: [Plplot-general] wxWidgets driver -- change the default >>>>> blackbackground >>>>> >>>>> Hi >>>>> >>>>> >>>>> I am trying to change the default black background color using the >>>>> wxWidgets >>>>> driver >>>>> >>>>> If using the SVG driver this can be done as explained here >>>>> >>>>> https://sourceforge.net/p/plplot/mailman/message/2817799/ >>>>> >>>>> the trick being calling >>>>> >>>>> plscolbg() >>>>> >>>>> before >>>>> >>>>> plinit(); >>>>> >>>>> like the sample code below marked "SVG Driver" does >>>>> >>>>> >>>>> However for the wxWidegts driver , it seems we do not do a call to >>>>> >>>>> plinit(); >>>>> >>>>> but rather this is done inside the C++ stream initialization >>>>> >>>>> From the wxWidgets PLplot sample below >>>>> >>>>> the >>>>> >>>>> plinit(); >>>>> >>>>> is made inside >>>>> >>>>> >>>>> >>>>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); >>>>> >>>>> >>>>> so I don't find a way to call the plscolbg() function before >>>>> >>>>> >>>>> How can this be accomplished ? >>>>> >>>>> >>>>> >>>>> >>>>> I also tried to modify the default colors of the default palette >>>>> >>>>> cmap0_default.pal >>>>> >>>>> 16 >>>>> #000000 >>>>> >>>>> so that the first is white >>>>> >>>>> this does work *but* only after the window is redrawn (it first shows >>>>> the >>>>> default red on black); >>>>> this seems like a bug to me >>>>> >>>>> >>>>> Also, what's the call to increase the font size? >>>>> On the wxWidgets driver the font looks tiny >>>>> >>>>> Thanks ! >>>>> >>>>> >>>>> Sample code wxWidgets >>>>> >>>>> >>>>> >>>>> bool >>>>> >>>>> wxAppPlot::OnInit() >>>>> >>>>> { >>>>> >>>>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>>>> >>>>> frame->Create( >>>>> >>>>> NULL, wxID_ANY, wxT("wxPLplot")); >>>>> >>>>> frame->Show(); >>>>> >>>>> Plot(frame); >>>>> >>>>> return true; >>>>> >>>>> } >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //Plot >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> template >>>>> >>>>> < class WXWINDOW > >>>>> >>>>> void >>>>> >>>>> Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >>>>> >>>>> { >>>>> >>>>> wxPLplotstream* pls = plotwindow->GetStream(); >>>>> >>>>> //render >>>>> >>>>> plotwindow->RenewPlot(); >>>>> >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> Sample code SVG driver >>>>> >>>>> void >>>>> >>>>> atms_dwell_granu_t::plot() >>>>> >>>>> { >>>>> >>>>> //set SVG device and output file name >>>>> >>>>> plsdev("svg"); >>>>> >>>>> plsfnam("atms_dwell_granu.svg"); >>>>> >>>>> //set background color (0) to white RGB(255,255,255) >>>>> >>>>> //must be called before plinit() >>>>> >>>>> plscolbg(255, 255, 255); >>>>> >>>>> //initialize plplot >>>>> >>>>> plinit(); >>>>> >>>>> //change color (0) to black RGB(0, 0, 0) >>>>> >>>>> //must be called after plinit() >>>>> >>>>> plscol0(0, 0, 0, 0); >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> //render >>>>> >>>>> >>>>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>>>> >>>>> PLFLT xmin, xmax, ymin, ymax; >>>>> >>>>> PLFLT *x, *y; >>>>> >>>>> const int NSIZE = iOrbit_all; >>>>> >>>>> xmin = 0; >>>>> >>>>> xmax = NSIZE; >>>>> >>>>> ymin = -1.0; >>>>> >>>>> ymax = 6.0; >>>>> >>>>> x = >>>>> >>>>> new PLFLT[NSIZE]; >>>>> >>>>> y = >>>>> >>>>> new PLFLT[NSIZE]; >>>>> >>>>> plcol0(0); >>>>> >>>>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>>>> >>>>> pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); >>>>> >>>>> //time axis >>>>> >>>>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>>>> >>>>> { >>>>> >>>>> x[idx_orb] = idx_orb; >>>>> >>>>> } >>>>> >>>>> //mean >>>>> >>>>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>>>> >>>>> { >>>>> >>>>> y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - >>>>> 1][idx_orb]; >>>>> >>>>> } >>>>> >>>>> plpoin(NSIZE, x, y, 46); >>>>> >>>>> plend(); >>>>> >>>>> delete[] x; >>>>> >>>>> delete[] y; >>>>> >>>>> } >>>>> >>>>> ________________________________ >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>>> >>>>> ________________________________ >>>>> >>>>> _______________________________________________ >>>>> Plplot-general mailing list >>>>> Plp...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/plplot-general >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Plplot-devel mailing list >>>>> Plp...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/plplot-devel >>>>> >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Plplot-devel mailing list >>> Plp...@li... >>> https://lists.sourceforge.net/lists/listinfo/plplot-devel >>> >> > |
From: Pedro V. <ped...@sp...> - 2016-10-06 15:41:47
|
Phil I believe there is stiil an issue with this solution my sample worked because I had plcol0(8); that does the plot in brown color if I try to plot in black color (on white bacground now) by doing plcol0(0); then I have no plot, since color 0 is now white is there a way with this solution to define color 0 as black for the plot? I tried to call plscol0(0, 0, 0, 0); as wxPLplotstream* pls = plotwindow->GetStream(); pls->adv(0); pls->scolbg(255, 255, 255); pls->clear(); plscol0(0, 0, 0, 0); but like this I have the default red on black again for now, the way I was able to have the black on white background was to replicate all the code of wxPLplotwindow wxPLplotwindow into new classes , giving them another name, commenting the init() call on them and then doing this code (note that the classes are renamed to wx_PLplotwindow and wx_PLplotstream) bool wxAppPlot::OnInit() { wx_PLplotwindow<wxFrame> *frame = new wx_PLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), wxDefaultPosition, wxSize(900, 700)); frame->Show(); //set background color (0) to white RGB(255,255,255) //must be called before plinit() plscolbg(255, 255, 255); wx_PLplotstream* pls = frame->GetStream(); pls->init(); //change color (0) to black RGB(0, 0, 0) //must be called after plinit() plscol0(0, 0, 0, 0); Plot(frame); return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////// //Plot ///////////////////////////////////////////////////////////////////////////////////////////////////// template< class WXWINDOW > void Plot(wx_PLplotwindow<WXWINDOW> *plotwindow) { wx_PLplotstream* pls = plotwindow->GetStream(); //render const int NSIZE = 101; PLFLT x[NSIZE], y[NSIZE]; PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; for (int i = 0; i < NSIZE; i++) { x[i] = i; y[i] = 5; } plschr(0, 1.0); plcol0(0); plenv(xmin, xmax, ymin, ymax, 0, 0); pllab("x", "y", "Label"); plpoin(NSIZE, x, y, 46); plotwindow->RenewPlot(); } ----- Original Message ----- From: "Pedro Vicente" <ped...@sp...> To: "Phil Rosenberg" <p.d...@gm...> Cc: <plp...@li...>; <plp...@li...> Sent: Thursday, October 06, 2016 10:44 AM Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change thedefault blackbackground > Hi Phil, Alan > > This solution worked for me, thanks > > >> The easiest way to do this at the moment is something like >> >> wxPLplotstream* pls = plotwindow->GetStream(); >> pls->adv( 0 ); >> pls->scolbg(255, 255, 255); >> pls->clear(); >> //rest of your plotting code > > > >> I'm very open to better ways >> to do this if you have suggestions. > > The only suggestion I have is the one I sent on my previous mail, that > was *not* to have > > wxPLplotstream::Create > > call > > init() > > and let the user do that on his application. > > > By looking at the samples, I believe they all call plinit() at start, > > > > my complete test code is now > > > #include "wx/wxprec.h" > #include "wx/wx.h" > #include "wxPLplotwindow.h" > > template< class WXWINDOW > > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow); > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > //wxAppPlot > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > class wxAppPlot : public wxApp > { > public: > virtual bool OnInit(); > }; > > IMPLEMENT_APP(wxAppPlot) > > bool wxAppPlot::OnInit() > { > wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); > frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), > wxDefaultPosition, > wxSize(900, 700)); > frame->Show(); > Plot(frame); > return true; > } > > ///////////////////////////////////////////////////////////////////////////////////////////////////// > //Plot > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > template< class WXWINDOW > > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) > { > wxPLplotstream* pls = plotwindow->GetStream(); > pls->adv(0); > pls->scolbg(255, 255, 255); > pls->clear(); > > //render > > const int NSIZE = 101; > PLFLT x[NSIZE], y[NSIZE]; > PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; > > for (int i = 0; i < NSIZE; i++) > { > x[i] = i; > y[i] = 5; > } > > plschr(0, 1.0); > plcol0(8); > plenv(xmin, xmax, ymin, ymax, 0, 0); > pllab("x", "y", "Label"); > plpoin(NSIZE, x, y, 46); > > plotwindow->RenewPlot(); > } > > > -Pedro > > ----- Original Message ----- > From: "Phil Rosenberg" <p.d...@gm...> > To: "Pedro Vicente" <ped...@sp...> > Cc: <plp...@li...>; > <plp...@li...> > Sent: Thursday, October 06, 2016 5:55 AM > Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change > the > default blackbackground > > >> Hi Pedro >> The easiest way to do this at the moment is something like >> >> wxPLplotstream* pls = plotwindow->GetStream(); >> pls->adv( 0 ); >> pls->scolbg(255, 255, 255); >> pls->clear(); >> //rest of your plotting code >> >> If you have multiple subpages then you will need to do this on each >> page. Also if your subpages don't cover all the windows then you can >> call the SetBackgroundColour method of wxPLplotwindow and this will >> clear the whole window to the given colour initially. >> >> Hope that helps. If not then let me know. I'm very open to better ways >> to do this if you have suggestions. >> >> Phil >> >> >> On 6 October 2016 at 06:00, Pedro Vicente >> <ped...@sp...> wrote: >>> >>> so, there are at least 2 solutions for this : >>> 1) the quick is just to modify the PLplot source code , in the call to >>> >>> void wxPLplotstream::Create >>> >>> comment the call to >>> >>> //init(); >>> >>> then in our app code , do the init() call after Create() . as >>> >>> ~~~ >>> bool wxAppPlot::OnInit() >>> { >>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >>> wxDefaultPosition, >>> wxSize(900, 700)); >>> frame->Show(); >>> >>> //set background color (0) to white RGB(255,255,255) >>> //must be called before plinit() >>> plscolbg(255, 255, 255); >>> >>> wxPLplotstream* pls = frame->GetStream(); >>> pls->init(); >>> >>> //change color (0) to black RGB(0, 0, 0) >>> //must be called after plinit() >>> plscol0(0, 0, 0, 0); >>> >>> Plot(frame); >>> return true; >>> } >>> ~~~ >>> >>> >>> since it seems the only way to modiy the background color is to do the >>> above >>> sequence >>> this is a change that I recommend to be included in the libray, since I >>> believe the other drivers require a call to init() too, but not the >>> wxWidgets driver. >>> >>> 2) not modifying the source code. In this case , I think it should be >>> possible to derive 2 classes , >>> a) one from wxPLplotwindow >>> b) other from wxPLplotwindow >>> >>> then do everything in those classes as now except the call to init() >>> >>> >>> but if the developers could do option 1) that probably would be the best >>> thanks >>> >>> >>> -Pedro >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Pedro Vicente >>> To: plp...@li... >>> Sent: Wednesday, October 05, 2016 6:42 PM >>> Subject: [Plplot-general] wxWidgets driver -- change the default >>> blackbackground >>> >>> Hi >>> >>> >>> I am trying to change the default black background color using the >>> wxWidgets >>> driver >>> >>> If using the SVG driver this can be done as explained here >>> >>> https://sourceforge.net/p/plplot/mailman/message/2817799/ >>> >>> the trick being calling >>> >>> plscolbg() >>> >>> before >>> >>> plinit(); >>> >>> like the sample code below marked "SVG Driver" does >>> >>> >>> However for the wxWidegts driver , it seems we do not do a call to >>> >>> plinit(); >>> >>> but rather this is done inside the C++ stream initialization >>> >>> From the wxWidgets PLplot sample below >>> >>> the >>> >>> plinit(); >>> >>> is made inside >>> >>> >>> >>> frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); >>> >>> >>> so I don't find a way to call the plscolbg() function before >>> >>> >>> How can this be accomplished ? >>> >>> >>> >>> >>> I also tried to modify the default colors of the default palette >>> >>> cmap0_default.pal >>> >>> 16 >>> #000000 >>> >>> so that the first is white >>> >>> this does work *but* only after the window is redrawn (it first shows >>> the >>> default red on black); >>> this seems like a bug to me >>> >>> >>> Also, what's the call to increase the font size? >>> On the wxWidgets driver the font looks tiny >>> >>> Thanks ! >>> >>> >>> Sample code wxWidgets >>> >>> >>> >>> bool >>> >>> wxAppPlot::OnInit() >>> >>> { >>> >>> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >>> >>> frame->Create( >>> >>> NULL, wxID_ANY, wxT("wxPLplot")); >>> >>> frame->Show(); >>> >>> Plot(frame); >>> >>> return true; >>> >>> } >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //Plot >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> template >>> >>> < class WXWINDOW > >>> >>> void >>> >>> Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >>> >>> { >>> >>> wxPLplotstream* pls = plotwindow->GetStream(); >>> >>> //render >>> >>> plotwindow->RenewPlot(); >>> >>> } >>> >>> >>> >>> >>> Sample code SVG driver >>> >>> void >>> >>> atms_dwell_granu_t::plot() >>> >>> { >>> >>> //set SVG device and output file name >>> >>> plsdev("svg"); >>> >>> plsfnam("atms_dwell_granu.svg"); >>> >>> //set background color (0) to white RGB(255,255,255) >>> >>> //must be called before plinit() >>> >>> plscolbg(255, 255, 255); >>> >>> //initialize plplot >>> >>> plinit(); >>> >>> //change color (0) to black RGB(0, 0, 0) >>> >>> //must be called after plinit() >>> >>> plscol0(0, 0, 0, 0); >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> //render >>> >>> ///////////////////////////////////////////////////////////////////////////////////////////////////// >>> >>> PLFLT xmin, xmax, ymin, ymax; >>> >>> PLFLT *x, *y; >>> >>> const int NSIZE = iOrbit_all; >>> >>> xmin = 0; >>> >>> xmax = NSIZE; >>> >>> ymin = -1.0; >>> >>> ymax = 6.0; >>> >>> x = >>> >>> new PLFLT[NSIZE]; >>> >>> y = >>> >>> new PLFLT[NSIZE]; >>> >>> plcol0(0); >>> >>> plenv(xmin, xmax, ymin, ymax, 0, 0); >>> >>> pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); >>> >>> //time axis >>> >>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>> >>> { >>> >>> x[idx_orb] = idx_orb; >>> >>> } >>> >>> //mean >>> >>> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >>> >>> { >>> >>> y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - 1][idx_orb]; >>> >>> } >>> >>> plpoin(NSIZE, x, y, 46); >>> >>> plend(); >>> >>> delete[] x; >>> >>> delete[] y; >>> >>> } >>> >>> ________________________________ >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>> >>> ________________________________ >>> >>> _______________________________________________ >>> Plplot-general mailing list >>> Plp...@li... >>> https://lists.sourceforge.net/lists/listinfo/plplot-general >>> >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Plplot-devel mailing list >>> Plp...@li... >>> https://lists.sourceforge.net/lists/listinfo/plplot-devel >>> >> > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |
From: Pedro V. <ped...@sp...> - 2016-10-06 14:44:07
|
Hi Phil, Alan This solution worked for me, thanks > The easiest way to do this at the moment is something like > > wxPLplotstream* pls = plotwindow->GetStream(); > pls->adv( 0 ); > pls->scolbg(255, 255, 255); > pls->clear(); > //rest of your plotting code > I'm very open to better ways > to do this if you have suggestions. The only suggestion I have is the one I sent on my previous mail, that was *not* to have wxPLplotstream::Create call init() and let the user do that on his application. By looking at the samples, I believe they all call plinit() at start, my complete test code is now #include "wx/wxprec.h" #include "wx/wx.h" #include "wxPLplotwindow.h" template< class WXWINDOW > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow); ///////////////////////////////////////////////////////////////////////////////////////////////////// //wxAppPlot ///////////////////////////////////////////////////////////////////////////////////////////////////// class wxAppPlot : public wxApp { public: virtual bool OnInit(); }; IMPLEMENT_APP(wxAppPlot) bool wxAppPlot::OnInit() { wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), wxDefaultPosition, wxSize(900, 700)); frame->Show(); Plot(frame); return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////// //Plot ///////////////////////////////////////////////////////////////////////////////////////////////////// template< class WXWINDOW > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) { wxPLplotstream* pls = plotwindow->GetStream(); pls->adv(0); pls->scolbg(255, 255, 255); pls->clear(); //render const int NSIZE = 101; PLFLT x[NSIZE], y[NSIZE]; PLFLT xmin = 0, xmax = 100, ymin = 0, ymax = 10; for (int i = 0; i < NSIZE; i++) { x[i] = i; y[i] = 5; } plschr(0, 1.0); plcol0(8); plenv(xmin, xmax, ymin, ymax, 0, 0); pllab("x", "y", "Label"); plpoin(NSIZE, x, y, 46); plotwindow->RenewPlot(); } -Pedro ----- Original Message ----- From: "Phil Rosenberg" <p.d...@gm...> To: "Pedro Vicente" <ped...@sp...> Cc: <plp...@li...>; <plp...@li...> Sent: Thursday, October 06, 2016 5:55 AM Subject: Re: [Plplot-devel] [Plplot-general] wxWidgets driver -- change the default blackbackground > Hi Pedro > The easiest way to do this at the moment is something like > > wxPLplotstream* pls = plotwindow->GetStream(); > pls->adv( 0 ); > pls->scolbg(255, 255, 255); > pls->clear(); > //rest of your plotting code > > If you have multiple subpages then you will need to do this on each > page. Also if your subpages don't cover all the windows then you can > call the SetBackgroundColour method of wxPLplotwindow and this will > clear the whole window to the given colour initially. > > Hope that helps. If not then let me know. I'm very open to better ways > to do this if you have suggestions. > > Phil > > > On 6 October 2016 at 06:00, Pedro Vicente > <ped...@sp...> wrote: >> >> so, there are at least 2 solutions for this : >> 1) the quick is just to modify the PLplot source code , in the call to >> >> void wxPLplotstream::Create >> >> comment the call to >> >> //init(); >> >> then in our app code , do the init() call after Create() . as >> >> ~~~ >> bool wxAppPlot::OnInit() >> { >> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >> frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), >> wxDefaultPosition, >> wxSize(900, 700)); >> frame->Show(); >> >> //set background color (0) to white RGB(255,255,255) >> //must be called before plinit() >> plscolbg(255, 255, 255); >> >> wxPLplotstream* pls = frame->GetStream(); >> pls->init(); >> >> //change color (0) to black RGB(0, 0, 0) >> //must be called after plinit() >> plscol0(0, 0, 0, 0); >> >> Plot(frame); >> return true; >> } >> ~~~ >> >> >> since it seems the only way to modiy the background color is to do the >> above >> sequence >> this is a change that I recommend to be included in the libray, since I >> believe the other drivers require a call to init() too, but not the >> wxWidgets driver. >> >> 2) not modifying the source code. In this case , I think it should be >> possible to derive 2 classes , >> a) one from wxPLplotwindow >> b) other from wxPLplotwindow >> >> then do everything in those classes as now except the call to init() >> >> >> but if the developers could do option 1) that probably would be the best >> thanks >> >> >> -Pedro >> >> >> >> >> ----- Original Message ----- >> From: Pedro Vicente >> To: plp...@li... >> Sent: Wednesday, October 05, 2016 6:42 PM >> Subject: [Plplot-general] wxWidgets driver -- change the default >> blackbackground >> >> Hi >> >> >> I am trying to change the default black background color using the >> wxWidgets >> driver >> >> If using the SVG driver this can be done as explained here >> >> https://sourceforge.net/p/plplot/mailman/message/2817799/ >> >> the trick being calling >> >> plscolbg() >> >> before >> >> plinit(); >> >> like the sample code below marked "SVG Driver" does >> >> >> However for the wxWidegts driver , it seems we do not do a call to >> >> plinit(); >> >> but rather this is done inside the C++ stream initialization >> >> From the wxWidgets PLplot sample below >> >> the >> >> plinit(); >> >> is made inside >> >> >> >> frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); >> >> >> so I don't find a way to call the plscolbg() function before >> >> >> How can this be accomplished ? >> >> >> >> >> I also tried to modify the default colors of the default palette >> >> cmap0_default.pal >> >> 16 >> #000000 >> >> so that the first is white >> >> this does work *but* only after the window is redrawn (it first shows the >> default red on black); >> this seems like a bug to me >> >> >> Also, what's the call to increase the font size? >> On the wxWidgets driver the font looks tiny >> >> Thanks ! >> >> >> Sample code wxWidgets >> >> >> >> bool >> >> wxAppPlot::OnInit() >> >> { >> >> wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); >> >> frame->Create( >> >> NULL, wxID_ANY, wxT("wxPLplot")); >> >> frame->Show(); >> >> Plot(frame); >> >> return true; >> >> } >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //Plot >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> template >> >> < class WXWINDOW > >> >> void >> >> Plot(wxPLplotwindow<WXWINDOW> *plotwindow) >> >> { >> >> wxPLplotstream* pls = plotwindow->GetStream(); >> >> //render >> >> plotwindow->RenewPlot(); >> >> } >> >> >> >> >> Sample code SVG driver >> >> void >> >> atms_dwell_granu_t::plot() >> >> { >> >> //set SVG device and output file name >> >> plsdev("svg"); >> >> plsfnam("atms_dwell_granu.svg"); >> >> //set background color (0) to white RGB(255,255,255) >> >> //must be called before plinit() >> >> plscolbg(255, 255, 255); >> >> //initialize plplot >> >> plinit(); >> >> //change color (0) to black RGB(0, 0, 0) >> >> //must be called after plinit() >> >> plscol0(0, 0, 0, 0); >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> //render >> >> ///////////////////////////////////////////////////////////////////////////////////////////////////// >> >> PLFLT xmin, xmax, ymin, ymax; >> >> PLFLT *x, *y; >> >> const int NSIZE = iOrbit_all; >> >> xmin = 0; >> >> xmax = NSIZE; >> >> ymin = -1.0; >> >> ymax = 6.0; >> >> x = >> >> new PLFLT[NSIZE]; >> >> y = >> >> new PLFLT[NSIZE]; >> >> plcol0(0); >> >> plenv(xmin, xmax, ymin, ymax, 0, 0); >> >> pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); >> >> //time axis >> >> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >> >> { >> >> x[idx_orb] = idx_orb; >> >> } >> >> //mean >> >> for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) >> >> { >> >> y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - 1][idx_orb]; >> >> } >> >> plpoin(NSIZE, x, y, 46); >> >> plend(); >> >> delete[] x; >> >> delete[] y; >> >> } >> >> ________________________________ >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> >> ________________________________ >> >> _______________________________________________ >> Plplot-general mailing list >> Plp...@li... >> https://lists.sourceforge.net/lists/listinfo/plplot-general >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> Plplot-devel mailing list >> Plp...@li... >> https://lists.sourceforge.net/lists/listinfo/plplot-devel >> > |
From: Alan W. I. <ir...@be...> - 2016-10-06 07:14:02
|
On 2016-10-05 18:42-0400 Pedro Vicente wrote: > Hi > > > I am trying to change the default black background color using the wxWidgets driver > > If using the SVG driver this can be done as explained here > > https://sourceforge.net/p/plplot/mailman/message/2817799/ > > the trick being calling > > plscolbg() > > before > > plinit(); > Hi Pedro: You are correct. You should be able to specify background colour for all devices if they have been programmed correctly, but it turns out you have found a wxwidgets-related bug. The rest of this is directed to Phil since the wxwidgets-related code is his, and I have verified the bug in perhaps a more standard way than your example. @Phil, will you look into this please? To verify this bug myself, I did the following steps which you should be able to replicate for yourself. * Run cmake with the -DBUILD_TEST=ON option which configures the build of our standard examples. * Build a standard example (the 00 standard example in C in this case, but any other standard example will likely also demonstrate this bug). make x00c * Build several different devices to try. make svg make xwin make wxwidgets wxPLViewer #wxwidgets interacts with wxPLViewer at run time so both have to be built * Run the 00 standard example with different devices and with a blue background specified. (The -bg option is the same as calling plscolbg before plinit in the standard example, and the -bg colour is specified with the standard RRGGBB hexadecimal notation so 0000FF is saturated blue) examples/c/x00c -dev svg -bg 0000FF -o test.svg examples/c/x00c -dev xwin -bg 0000FF examples/c/x00c -dev wxwidgets -bg 0000FF I found that the svg and xwin results had the specified blue background, but the wxPLViewer instance that was automatically launched and communicated with by -dev wxwidgets rendered the background as the default black rather than the specified blue ==> BUG. I don't know if that is a bug in -dev wxwidgets, a bug in the way background colours are communicated to the wxPLViewer instance, and/or a bug in the wxPLViewer code, but I assume you will be readily able to figure this out from your knowledge of each of these components of our wxwidgets-related code. To my mind, the highest priority is to get -dev wxwidgets to work properly with -bg as requested above, but as a much lower priority it would be good to build most of the standard PLplot command-line parsing (likely mostly everything other than -dev and -o) into examples/c++/wxPLplotDemo.cpp so that it would be possible, for example to run examples/c++/wxPLplotDemo -bg 0000FF -geometry -geometry 500x1000 and get the specified blue background and geometry for that example. Just to remind you and others here, please run, e.g., examples/c/x00c -h to get help on all the PLplot options that can be parsed from the command line. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Pedro V. <ped...@sp...> - 2016-10-06 05:00:15
|
so, there are at least 2 solutions for this : 1) the quick is just to modify the PLplot source code , in the call to void wxPLplotstream::Create comment the call to //init(); then in our app code , do the init() call after Create() . as ~~~ bool wxAppPlot::OnInit() { wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot"), wxDefaultPosition, wxSize(900, 700)); frame->Show(); //set background color (0) to white RGB(255,255,255) //must be called before plinit() plscolbg(255, 255, 255); wxPLplotstream* pls = frame->GetStream(); pls->init(); //change color (0) to black RGB(0, 0, 0) //must be called after plinit() plscol0(0, 0, 0, 0); Plot(frame); return true; } ~~~ since it seems the only way to modiy the background color is to do the above sequence this is a change that I recommend to be included in the libray, since I believe the other drivers require a call to init() too, but not the wxWidgets driver. 2) not modifying the source code. In this case , I think it should be possible to derive 2 classes , a) one from wxPLplotwindow b) other from wxPLplotwindow then do everything in those classes as now except the call to init() but if the developers could do option 1) that probably would be the best thanks -Pedro ----- Original Message ----- From: Pedro Vicente To: plp...@li... Sent: Wednesday, October 05, 2016 6:42 PM Subject: [Plplot-general] wxWidgets driver -- change the default blackbackground Hi I am trying to change the default black background color using the wxWidgets driver If using the SVG driver this can be done as explained here https://sourceforge.net/p/plplot/mailman/message/2817799/ the trick being calling plscolbg() before plinit(); like the sample code below marked "SVG Driver" does However for the wxWidegts driver , it seems we do not do a call to plinit(); but rather this is done inside the C++ stream initialization From the wxWidgets PLplot sample below the plinit(); is made inside frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); so I don't find a way to call the plscolbg() function before How can this be accomplished ? I also tried to modify the default colors of the default palette cmap0_default.pal 16 #000000 so that the first is white this does work *but* only after the window is redrawn (it first shows the default red on black); this seems like a bug to me Also, what's the call to increase the font size? On the wxWidgets driver the font looks tiny Thanks ! Sample code wxWidgets bool wxAppPlot::OnInit() { wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); frame->Show(); Plot(frame); return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////// //Plot ///////////////////////////////////////////////////////////////////////////////////////////////////// template< class WXWINDOW > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) { wxPLplotstream* pls = plotwindow->GetStream(); //render plotwindow->RenewPlot(); } Sample code SVG driver void atms_dwell_granu_t::plot() { //set SVG device and output file name plsdev("svg"); plsfnam("atms_dwell_granu.svg"); //set background color (0) to white RGB(255,255,255) //must be called before plinit() plscolbg(255, 255, 255); //initialize plplot plinit(); //change color (0) to black RGB(0, 0, 0) //must be called after plinit() plscol0(0, 0, 0, 0); ///////////////////////////////////////////////////////////////////////////////////////////////////// //render ///////////////////////////////////////////////////////////////////////////////////////////////////// PLFLT xmin, xmax, ymin, ymax; PLFLT *x, *y; const int NSIZE = iOrbit_all; xmin = 0; xmax = NSIZE; ymin = -1.0; ymax = 6.0; x = new PLFLT[NSIZE]; y = new PLFLT[NSIZE]; plcol0(0); plenv(xmin, xmax, ymin, ymax, 0, 0); pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); //time axis for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) { x[idx_orb] = idx_orb; } //mean for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) { y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - 1][idx_orb]; } plpoin(NSIZE, x, y, 46); plend(); delete[] x; delete[] y; } ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ------------------------------------------------------------------------------ _______________________________________________ Plplot-general mailing list Plp...@li... https://lists.sourceforge.net/lists/listinfo/plplot-general |
From: Pedro V. <ped...@sp...> - 2016-10-05 22:42:19
|
Hi I am trying to change the default black background color using the wxWidgets driver If using the SVG driver this can be done as explained here https://sourceforge.net/p/plplot/mailman/message/2817799/ the trick being calling plscolbg() before plinit(); like the sample code below marked "SVG Driver" does However for the wxWidegts driver , it seems we do not do a call to plinit(); but rather this is done inside the C++ stream initialization >From the wxWidgets PLplot sample below the plinit(); is made inside frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); so I don't find a way to call the plscolbg() function before How can this be accomplished ? I also tried to modify the default colors of the default palette cmap0_default.pal 16 #000000 so that the first is white this does work *but* only after the window is redrawn (it first shows the default red on black); this seems like a bug to me Also, what's the call to increase the font size? On the wxWidgets driver the font looks tiny Thanks ! Sample code wxWidgets bool wxAppPlot::OnInit() { wxPLplotwindow<wxFrame> *frame = new wxPLplotwindow<wxFrame>(); frame->Create(NULL, wxID_ANY, wxT("wxPLplot")); frame->Show(); Plot(frame); return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////// //Plot ///////////////////////////////////////////////////////////////////////////////////////////////////// template< class WXWINDOW > void Plot(wxPLplotwindow<WXWINDOW> *plotwindow) { wxPLplotstream* pls = plotwindow->GetStream(); //render plotwindow->RenewPlot(); } Sample code SVG driver void atms_dwell_granu_t::plot() { //set SVG device and output file name plsdev("svg"); plsfnam("atms_dwell_granu.svg"); //set background color (0) to white RGB(255,255,255) //must be called before plinit() plscolbg(255, 255, 255); //initialize plplot plinit(); //change color (0) to black RGB(0, 0, 0) //must be called after plinit() plscol0(0, 0, 0, 0); ///////////////////////////////////////////////////////////////////////////////////////////////////// //render ///////////////////////////////////////////////////////////////////////////////////////////////////// PLFLT xmin, xmax, ymin, ymax; PLFLT *x, *y; const int NSIZE = iOrbit_all; xmin = 0; xmax = NSIZE; ymin = -1.0; ymax = 6.0; x = new PLFLT[NSIZE]; y = new PLFLT[NSIZE]; plcol0(0); plenv(xmin, xmax, ymin, ymax, 0, 0); pllab("", "Current (Amps)", "Scan Drive Main Motor Current"); //time axis for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) { x[idx_orb] = idx_orb; } //mean for (int idx_orb = 0; idx_orb < NSIZE; idx_orb++) { y[idx_orb] = DWELL_SAMPLE_APID517_Orbit[0][TLM_NUM_ORBIT - 1][idx_orb]; } plpoin(NSIZE, x, y, 46); plend(); delete[] x; delete[] y; } |
From: Alan W. I. <ir...@be...> - 2016-09-30 16:25:44
|
On 2016-09-30 06:35-0000 Arjen Markus wrote: > Hi Alan, Cristiano, > >> -----Original Message----- >> From: Alan W. Irwin [mailto:ir...@be...] >> >> @Arjen: Sorry, but I do not agree with this advice even though you are likely the >> most experienced Windows user here. The issue is that PLPLOT_DRV_DIR is not >> recommended because it is typically not enough, and it is too easy to set it for the >> build tree when you need it for the install tree, etc. >> > I did not take the time yesterday to ask for details. The settings to allow programs that use PLplot to find the drivers should be clarified. The typical situation should be one where PLplot has been properly installed (I must admit I seldom do that and work from my build directory mostly, as my programs are generally ad hoc). I will try and come up with a concise guide for this. Which will actually involve the three flavours of Windows environments we currently support - bare Windows, Cygwin and MinGW-w64/MSYS2. (I hope the 32-bits version of Cygwin and MinGW behave in the same way as the 64-bits one.) @Arjen: I look forward to those wiki changes. @Cristiano: note that Arjen is the real Windows expert (I only have occasional experience with MinGW/MSYS on the Wine version of Windows). So you should pay close attention to his Wiki changes once he makes those. Also an issue with my advice (which I realized just this morning) is it is likely incomplete. I focussed completely on command-line builds (e.g., with the "NMake Makefiles" generator). That advice should be basically correct (since IDE's use the command-line underneath), but it may need some additions from Arjen (i.e., answers to your further questions about where is the build tree and where is the install tree) if you are using a cmake generator for one of the Windows IDE's. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Arjen M. <Arj...@de...> - 2016-09-30 06:35:31
|
Hi Alan, Cristiano, > -----Original Message----- > From: Alan W. Irwin [mailto:ir...@be...] > > @Arjen: Sorry, but I do not agree with this advice even though you are likely the > most experienced Windows user here. The issue is that PLPLOT_DRV_DIR is not > recommended because it is typically not enough, and it is too easy to set it for the > build tree when you need it for the install tree, etc. > I did not take the time yesterday to ask for details. The settings to allow programs that use PLplot to find the drivers should be clarified. The typical situation should be one where PLplot has been properly installed (I must admit I seldom do that and work from my build directory mostly, as my programs are generally ad hoc). I will try and come up with a concise guide for this. Which will actually involve the three flavours of Windows environments we currently support - bare Windows, Cygwin and MinGW-w64/MSYS2. (I hope the 32-bits version of Cygwin and MinGW behave in the same way as the 64-bits one.) Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |
From: Alan W. I. <ir...@be...> - 2016-09-29 15:45:31
|
On 2016-09-29 11:51-0000 Arjen Markus wrote: > Hello Christiano, > >> -----Original Message----- >> From: cristiano piatti [mailto:cri...@gm...] >> Sent: Thursday, September 29, 2016 12:02 PM >> To: plp...@li... >> Subject: [Plplot-general] drivers problem >> >> Hi everybody, >> i have successfully built plplot with Microsoft Visual C++ 2008 Express Edition >> (Windows 7 32bit). >> I have installed wxPack, Active Tcl and X-Win32 too. >> When trying compiled examples i get the same error message: >> >> *** PLPLOT ERROR, ABORTING OPERATION *** >> plInitDispatchTable: Could not open drivers directory, aborting operation >> Requested device 0 not available >> >> Could someone please explain me how can i make plplot use drivers ? >> >> Thank you very much in advance. >> > This means that PLplot cannot find the directory with the drivers. You can set the environment variable PLPLOT_DRV_DIR to point to that directory. If PLplot has been installed as appropriate for your platform, then it should pick up the drivers directly. @Arjen: Sorry, but I do not agree with this advice even though you are likely the most experienced Windows user here. The issue is that PLPLOT_DRV_DIR is not recommended because it is typically not enough, and it is too easy to set it for the build tree when you need it for the install tree, etc. @Christiano: to understand what I say below, the build tree is where you build PLplot, and the install tree is where you install PLplot. Typically before you do a build you should remove any stale install-tree results and also any stale build-tree results, i.e., start from an empty build directory. After the build step, you typically install PLplot in the install tree (which typically copies just the subset of the files in the build tree that are actually needed for PLplot to work) and completely delete the build tree (to save lots of space). Here are the full Windows directions taken from the scripts/comprehensive_test.sh script (look for logic concerning ANY_WINDOWS_PLATFORM" = "true" ). _____________ If working with the build tree (and not the install tree): * Remove any install-tree PATH settings (see below). * Put the dll subdirectory of the build tree on your PATH. (This should give access to both device drivers and other needed dll's.) _____________ If working with the install tree (and not the build tree): * Remove any build-tree PATH settings (see above). * Put the install-tree bin subdirectory on your PATH. (This should give access to the non-device dll's.) * Put the lib/plplot[0-9].[0-9]*.[0-9]*/drivers subdirectory on your PATH (This should give access to the device dll's.) _____________ I don't have access to Windows at the moment so I cannot check the above directions directly, but Arjen tells me the comprehensive script approach works on Windows so the above approach should work even if you are not using that script. @Arjen: if your much larger experience agrees confirms what I have summarized from the comprehensive test script, could you adjust the wiki appropriately? For example, <https://sourceforge.net/p/plplot/wiki/Configure_PLplot_for_the_Visual_Studio_IDE/> says even in the build tree you need to set PLPLOT_DRV_DIR, but I am positive that is not necessary (and will potentially screw up working with the install tree after the build tree has been deleted). Also, could you double-check that it is actually required to put lib/plplot[0-9].[0-9]*.[0-9]*/drivers on the PATH or is that also old, unnecessary advice? If unnecessary, I will adjust the comprehensive test script approprately. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Arjen M. <Arj...@de...> - 2016-09-29 11:51:51
|
Hello Christiano, > -----Original Message----- > From: cristiano piatti [mailto:cri...@gm...] > Sent: Thursday, September 29, 2016 12:02 PM > To: plp...@li... > Subject: [Plplot-general] drivers problem > > Hi everybody, > i have successfully built plplot with Microsoft Visual C++ 2008 Express Edition > (Windows 7 32bit). > I have installed wxPack, Active Tcl and X-Win32 too. > When trying compiled examples i get the same error message: > > *** PLPLOT ERROR, ABORTING OPERATION *** > plInitDispatchTable: Could not open drivers directory, aborting operation > Requested device 0 not available > > Could someone please explain me how can i make plplot use drivers ? > > Thank you very much in advance. > This means that PLplot cannot find the directory with the drivers. You can set the environment variable PLPLOT_DRV_DIR to point to that directory. If PLplot has been installed as appropriate for your platform, then it should pick up the drivers directly. Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |
From: cristiano p. <cri...@gm...> - 2016-09-29 10:02:26
|
Hi everybody, i have successfully built plplot with Microsoft Visual C++ 2008 Express Edition (Windows 7 32bit). I have installed wxPack, Active Tcl and X-Win32 too. When trying compiled examples i get the same error message: *** PLPLOT ERROR, ABORTING OPERATION *** plInitDispatchTable: Could not open drivers directory, aborting operation Requested device 0 not available Could someone please explain me how can i make plplot use drivers ? Thank you very much in advance. Cristian |
From: Tom S. <tom...@me...> - 2016-09-26 08:33:05
|
Hi Alan, I am confident that CMake is a decent build system. I will give it a try at some point. Please do keep me up to date about the outcome of the discussion among the core developers of whether or not you’ll be moving to Github. If it is decided to do so, I will gladly help out with the continuous integration setup. In the meantime, I hope you will still consider making the bug fix release, before making the release with the features that are currently being added/tested. Best, Tom > On 23 Sep 2016, at 23:15, Alan W. Irwin <ir...@be...> wrote: > > On 2016-09-23 12:30-0700 Alan W. Irwin wrote: > >> Note, a decade-old build system normally accumulates a lot of cruft >> and PLplot is no exception in that regard. So reducing that cruft and >> also learning to take advantage of modern CMake facilities requires a >> substantial amount of on-going maintenance. But I am happy to do that >> maintenance because the result is a build system that is much more >> sophisticated and useful than what we created a decade ago which in >> turn was already a bit more sophisticated than what we could achieve >> with autotools at that time. > > I want to correct a slightly wrong impression I gave there. I am > positive that with enough care and learning experience anything we do > with CMake could also be replicated by autotools and vice versa so > fundamentally there is no limit on the sophistication of build systems > implemented with _either_ CMake or autotools. > > However, that said, it is also fair to say that once someone uses > CMake seriously for a short time (it was just a few hours for me and > other PLplot developers who wanted to change the PLplot build system > in some way have had similar quick-learning experiences), they will > find most build-system and test-system components so easy to implement > with CMake that they by far prefer to use CMake rather than autotools > for that task from then on. Which is why we dropped our > autotools-based build system so quickly a decade ago. > > In sum, we were pretty heavy autotools users, but we tried CMake and > never looked back. And I expect most autotools users that try CMake > will also have similar positive experiences with it. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-23 22:15:54
|
On 2016-09-23 12:30-0700 Alan W. Irwin wrote: > Note, a decade-old build system normally accumulates a lot of cruft > and PLplot is no exception in that regard. So reducing that cruft and > also learning to take advantage of modern CMake facilities requires a > substantial amount of on-going maintenance. But I am happy to do that > maintenance because the result is a build system that is much more > sophisticated and useful than what we created a decade ago which in > turn was already a bit more sophisticated than what we could achieve > with autotools at that time. I want to correct a slightly wrong impression I gave there. I am positive that with enough care and learning experience anything we do with CMake could also be replicated by autotools and vice versa so fundamentally there is no limit on the sophistication of build systems implemented with _either_ CMake or autotools. However, that said, it is also fair to say that once someone uses CMake seriously for a short time (it was just a few hours for me and other PLplot developers who wanted to change the PLplot build system in some way have had similar quick-learning experiences), they will find most build-system and test-system components so easy to implement with CMake that they by far prefer to use CMake rather than autotools for that task from then on. Which is why we dropped our autotools-based build system so quickly a decade ago. In sum, we were pretty heavy autotools users, but we tried CMake and never looked back. And I expect most autotools users that try CMake will also have similar positive experiences with it. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-23 19:30:40
|
On 2016-09-23 15:30+0100 Tom Schoonjans wrote: > Hello once again, > > Travis-CI and Appveyor are not part of Github, but are separate companies in their own right. They are just (popular) examples of companies that make use of the webhook and integration possibilities that are offered by Github. A list of similar companies can be found here: https://github.com/integrations <https://github.com/integrations> > > To the best of my knowledge, most of these companies operate under a financial model that includes free usage by open source projects, but paid services for closed source projects (usually these are private repositories on Github, but private hosting is also possible). Either way, their usage is completely optional, though highly recommended. Even if one of these continuous integration providers would go broke or cease to provide free services for open source projects, there are alternative providers available, or they can just be turned off and other testing options could be found. > > If you would get [a cdash] server up and running, I am sure there are ways to have a webhook following a commit trigger a build. Good. > [out of order] I have to admit that my knowledge of CMake, CTest and CDash is next to nothing (I am more of autotools kind of guy myself), but it looks promising. We are strong advocates for CMake and friends ever since we moved to CMake a decade ago from a pretty sophisticated autotools approach. However, I will attempt to avoid over-advocating CMake to you by confining myself to making the suggestion that you give it a serious try for one of your software projects to see how you like it for your build-system and test system needs. Note, with a bit of care in choosing template file names for configuration both CMake-based and autotools-based build systems can coexist for the same software project so you can directly compare the results of the two. When we did that for PLplot we started by simply building one of our minor libraries with CMake as a proof of concept and when that proved to be trivial everyone pitched in so that very quickly (a month or so in our spare time) we had implemented a complete CMake-based build system for all the large number of components of PLplot. And ctest soon followed. We ended up liking that build and test system so much that we quickly (within 6 months or so) abandoned our autotools-based build system as too much trouble to maintain. After that positive experience I have personally moved to CMake for all my other software projects as well, and I assume other PLplot developers have mostly done the same. Note, a decade-old build system normally accumulates a lot of cruft and PLplot is no exception in that regard. So reducing that cruft and also learning to take advantage of modern CMake facilities requires a substantial amount of on-going maintenance. But I am happy to do that maintenance because the result is a build system that is much more sophisticated and useful than what we created a decade ago which in turn was already a bit more sophisticated than what we could achieve with autotools at that time. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-23 18:54:08
|
On 2016-09-23 11:29+0100 Tom Schoonjans wrote: > Hi Alan, > > > > A move to Github would certainly be advantageous for a number of reasons: > > - It would make receiving contributions and patches a lot easier (git-patch is not that cool). The fork-pullrequest system is phenomenally good. > - Github provides a more pleasant user experience on its website: no one is confronted with annoying ads when downloading tarballs > - Github is a more stable and reliable host: it has a very impressive uptime, and I think we all remember SF’s week long outage last year… As another example, it took me yesterday three attempts before I could successfully clone the PLplot repository. > - Github is considerably less evil than SF https://en.wikipedia.org/wiki/SourceForge#Controversies <https://en.wikipedia.org/wiki/SourceForge#Controversies> They are both big companies trying to figure out a way to monetize free software so in my view some stupidities are inevitable with both, and the question is when such stupidities occur how well do they ultimately respond to the concerns of the free software community they are hosting. I also think use of true free software products for their hosting environment does provide the free software community with some options to curb the worst excesses of the big companies in the long term. So the fact that Allura is completely free software that allows "SF clone" alternatives to SF to exist that use their identical hosting environment is reassuring to me. So I lean toward sticking with SF or one of its clones. But I might encourage someone else to move our git repository to github if git outages become the norm at SF rather than the one or two isolated incidents we have encountered so far. > > Moving the git repository to Github itself would be trivial. Just use https://github.com/new/import <https://github.com/new/import>, but I do recommend using the PLplot organization as owner. Just add yourself to it first and get sufficient privileges. Hazen I think you would be able to help out here since you seem to be in charge of this organization. > > The git history would be identical to the current one as it is a direct copy. Afterwards you can enforce whatever workflow you are comfortable with regarding contributions/patches. > > The website you host at plplot.sourceforge.net <http://plplot.sourceforge.net/> is another matter. Github does allow you to host websites (e.g. plplot.github.io), but they have to be static: no PHP! However there is nothing from switching the git repo to github while keeping the website where it is right now. This is actually pretty common. > > Same for downloads: either they can stay where they are or they can be moved to github. You have answered Hazen and my concerns about the negatives well. And it does makes sense to look at each SF service we currently use (e.g., git repository, website, file release area, wiki, and mailing lists) in turn to see which we might want to migrate to github and which not. So if some PLplot developer wanted to start that process with just the git repository, I would not stand in their way. However, that person would have to take full responsibility for moving our git repository to github which would include figuring out how to enforce our current workflow (and also our future workflow if we ever change to a different enforced workflow) at github in that git pull environment. However, that work would not be enough. That same person would also have to take the responsibility for responding to git pull requests, and when they discovered a pull violated our workflow rules, they would have to advise the requester what they have to change in their own workflow to make their pull request a valid one. And I am pretty sure a request simply to rebase on master tip will not be enough for topic branches with a seriously complex history that includes merge commits. So this is a non-trivial responsibility which I would not want to personally take on. Of course, another alternative (which my impression is a lot of naive git projects use) is not to worry in the slightest about enforced workflow and just accept the consequences of a seriously complex history and git log results that are impossible for a human to decipher. But I think that would be a serious mistake for PLplot to move in that naive direction so someone really does have to take the responsibilities that I have outlined above if they are determined to move our git repository from SF to github. However, I would also be content if the PLplot developers decided as a group to stick with our current simple procedure of using the SF git repository and git format-patch/am when we wish to collaborate on non-public topic branches. Note the git format-patch/am method worked very well for Arjen and me when we collaborated on the new Fortran binding before we jointly matured that private topic enough so that we could push that whole topic to master. And that collaboration was non-trivial with much repeated use of git format-patch and git am with essentially no issues at all (other than the occasional necessary conflict resolution between our various sets of concurrent changes). To be fair, I also note that one of our other developers has not been able to get the git format-patch/am method to work for the even simpler task of collaborating with himself on various Unix and Windows platforms. But because Arjen and I had no such trouble on widely different platforms (Cygwin git for him and Linux git for me), I assume that self-collaboration trouble is simply a matter of learning the correct workflow (e.g., preparing the appropriate private branch on each local repository so that it can be brought up to date with git am) so that the git format-patch/am method works properly. But so far this other developer has not followed up with trying some of our suggestions to resolve his difficulties with git format-patch/am so it does remain a question mark for now. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Tom S. <tom...@me...> - 2016-09-23 14:30:39
|
Hello once again, Travis-CI and Appveyor are not part of Github, but are separate companies in their own right. They are just (popular) examples of companies that make use of the webhook and integration possibilities that are offered by Github. A list of similar companies can be found here: https://github.com/integrations <https://github.com/integrations> To the best of my knowledge, most of these companies operate under a financial model that includes free usage by open source projects, but paid services for closed source projects (usually these are private repositories on Github, but private hosting is also possible). Either way, their usage is completely optional, though highly recommended. Even if one of these continuous integration providers would go broke or cease to provide free services for open source projects, there are alternative providers available, or they can just be turned off and other testing options could be found. I have to admit that my knowledge of CMake, CTest and CDash is next to nothing (I am more of autotools kind of guy myself), but it looks promising. If you would get such a server up and running, I am sure there are ways to have a webhook following a commit trigger a build. Best, Tom > On 22 Sep 2016, at 20:06, Alan W. Irwin <ir...@be...> wrote: > > Hi Tom: > > On 2016-09-22 13:54+0100 Tom Schoonjans wrote: > >> > [Hazen said] >>> I am not familiar with Travis-CI or AppVeyor but they sound interesting. >> >> Nowadays Continuous Integration is a standard tool for automated testing and building nightly releases. With Travis-CI and AppVeyor you can easily configure that each commit sets of a number of builds on Linux, Mac OS X and Windows using any combination of options and compilers you want. Plus it’s completely free for open-source projects! >> >> It is also possible to require PRs to successfully build and survive testing on Travis-CI and AppVeyor as a precondition for being merged in. >> >> For an example of Travis-CI and AppVeyor, have a look at for example https://github.com/tschoonj/easyRNG <https://github.com/tschoonj/easyRNG>, scroll to the end of the page and click on the green badges. > > Even if we move to github I would advise whoever is in charge of such > a move to not rely on semi-proprietary or proprietary products this > way since "free of cost" can change to "costly" with one corporate > decision at github. > > I do agree that nightly testing of PLplot would be worthwhile. In > fact, we are already almost completely set up to do that with ctest, > and very little more is required for anybody interested to publish > their nightly PLplot ctest results in cdash client mode. So all that > is essentially required is a cdash (see <www.cdash.org>) server to > collect and display those results in convenient form on a website. > KitWare already provides such a free service (see > <http://my.cdash.org/>), but I recall there are some limitations > (e.g., only a limited number of clients are allowed for a given > project such as PLplot). But note that cdash is a completely > open-source product so it should be straightforward to download that > source and build a cdash server. So ultimately if the my.cdash.org > limitations became an issue we would need to find a volunteer > (presumably someone who is already running their own website) who is > willing to build and host a cdash server for PLplot. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ |
From: Tom S. <tom...@me...> - 2016-09-23 10:43:48
|
Hi Alan, Releasing regularly new versions of the package is always good: it instills confidence in users that they are using a software package that is being actively developed and maintained. However, I do think that the approach of having bug-fix branches is essential when making regular releases (3-6 months). Implementing new features (like the new Fortran bindings you mentioned) can take a long time, and it is difficult to predict when a new feature is ready to ship. After all, I am assuming none of the core developers are working full-time on PLplot right? This way of working unfortunately leads to large gaps between releases, which has led to the current situation where PLplot cannot be compiled with the latest version of CMake. Having a bug fix branch, and making releases off it, would ensure that PLplot can quickly address incompatible changes in its dependencies, or just fix important bugs, while relieving the developers from the pressure of having to produce a new release that will be a mixture of (hopefully properly working) new features and bug fixes. Best, Tom > On 22 Sep 2016, at 20:01, Alan W. Irwin <ir...@be...> wrote: > > Hi Tom: > > On 2016-09-22 13:54+0100 Tom Schoonjans wrote: > >> In the scenario I am suggesting, you would just end up with a new > branch that starts at a tag and will contain bug fixes only. It will > never need to be merged into master as it will consist of commits that > were cherrypicked from master. > >> This kind of workflow is used for example by all GNOME projects such > as glib and gtk+: development occurs on master, when a new major > release is ready, a tag is created (e.g. 3.22.0), as well as a new > branch with the name of that major release (gtk-3-22), which will then > receive bug fixes that were cherrypicked from master, but not its new > features! Every now and then maintenance releases will be created off > this branch like 3.22.1, 3.22.2 etc. > > This is certainly a possible approach, but in my view an even better > (and simpler) approach would be to get out our releases (whether > maintenance releases or otherwise) in a timely manner, i.e., every 3-6 > months. I have obviously fallen short of that goal for this release, > but I also hope to do a lot better moving forward! > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ |
From: Tom S. <tom...@me...> - 2016-09-23 10:29:38
|
Hi Alan, A move to Github would certainly be advantageous for a number of reasons: - It would make receiving contributions and patches a lot easier (git-patch is not that cool). The fork-pullrequest system is phenomenally good. - Github provides a more pleasant user experience on its website: no one is confronted with annoying ads when downloading tarballs - Github is a more stable and reliable host: it has a very impressive uptime, and I think we all remember SF’s week long outage last year… As another example, it took me yesterday three attempts before I could successfully clone the PLplot repository. - Github is considerably less evil than SF https://en.wikipedia.org/wiki/SourceForge#Controversies <https://en.wikipedia.org/wiki/SourceForge#Controversies> Moving the git repository to Github itself would be trivial. Just use https://github.com/new/import <https://github.com/new/import>, but I do recommend using the PLplot organization as owner. Just add yourself to it first and get sufficient privileges. Hazen I think you would be able to help out here since you seem to be in charge of this organization. The git history would be identical to the current one as it is a direct copy. Afterwards you can enforce whatever workflow you are comfortable with regarding contributions/patches. The website you host at plplot.sourceforge.net <http://plplot.sourceforge.net/> is another matter. Github does allow you to host websites (e.g. plplot.github.io), but they have to be static: no PHP! However there is nothing from switching the git repo to github while keeping the website where it is right now. This is actually pretty common. Same for downloads: either they can stay where they are or they can be moved to github. On to the next email! Tom > On 22 Sep 2016, at 19:50, Alan W. Irwin <ir...@be...> wrote: > > Hi Tom: > > On 2016-09-22 13:54+0100 Tom Schoonjans wrote: > >> Hello again, >> > [Hazen asked] >>> We have been trying to maintain a linear history with git following > the process explained in the README.developers file. I think that the > fork and pull-request system would break this? > >> Not necessarily, you can ask people submitting a PR that they rebase > against master. You can even enforce as a required check before > merging that new branches are up to date with the latest changes in > master. > > @Tom: > > Keeping both a github and SF repository adds quite a bit of work so I > think what we are really discussing is whether we want to move > completely to github. But that move is a lot of work as well. I (as > current de facto maintainer of our official git repository at > SourceForge) would not want to do such work. However, if someone else > wanted to take up the responsibility of maintaining our official git > repository, I would be happy to hand over that responsibility. Furthermore, if they decided it would be a good idea to move to > github, I would not get in the way of such a move so long as such a > move did not dictate our git workflow and our git history (currently > stretching back to the early 90's) was preserved. More later about our workflow > under a different subject line.... > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-22 19:06:58
|
Hi Tom: On 2016-09-22 13:54+0100 Tom Schoonjans wrote: > [Hazen said] >> I am not familiar with Travis-CI or AppVeyor but they sound interesting. > > Nowadays Continuous Integration is a standard tool for automated testing and building nightly releases. With Travis-CI and AppVeyor you can easily configure that each commit sets of a number of builds on Linux, Mac OS X and Windows using any combination of options and compilers you want. Plus it’s completely free for open-source projects! > > It is also possible to require PRs to successfully build and survive testing on Travis-CI and AppVeyor as a precondition for being merged in. > > For an example of Travis-CI and AppVeyor, have a look at for example https://github.com/tschoonj/easyRNG <https://github.com/tschoonj/easyRNG>, scroll to the end of the page and click on the green badges. Even if we move to github I would advise whoever is in charge of such a move to not rely on semi-proprietary or proprietary products this way since "free of cost" can change to "costly" with one corporate decision at github. I do agree that nightly testing of PLplot would be worthwhile. In fact, we are already almost completely set up to do that with ctest, and very little more is required for anybody interested to publish their nightly PLplot ctest results in cdash client mode. So all that is essentially required is a cdash (see <www.cdash.org>) server to collect and display those results in convenient form on a website. KitWare already provides such a free service (see <http://my.cdash.org/>), but I recall there are some limitations (e.g., only a limited number of clients are allowed for a given project such as PLplot). But note that cdash is a completely open-source product so it should be straightforward to download that source and build a cdash server. So ultimately if the my.cdash.org limitations became an issue we would need to find a volunteer (presumably someone who is already running their own website) who is willing to build and host a cdash server for PLplot. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-22 19:01:42
|
Hi Tom: On 2016-09-22 13:54+0100 Tom Schoonjans wrote: > In the scenario I am suggesting, you would just end up with a new branch that starts at a tag and will contain bug fixes only. It will never need to be merged into master as it will consist of commits that were cherrypicked from master. > This kind of workflow is used for example by all GNOME projects such as glib and gtk+: development occurs on master, when a new major release is ready, a tag is created (e.g. 3.22.0), as well as a new branch with the name of that major release (gtk-3-22), which will then receive bug fixes that were cherrypicked from master, but not its new features! Every now and then maintenance releases will be created off this branch like 3.22.1, 3.22.2 etc. This is certainly a possible approach, but in my view an even better (and simpler) approach would be to get out our releases (whether maintenance releases or otherwise) in a timely manner, i.e., every 3-6 months. I have obviously fallen short of that goal for this release, but I also hope to do a lot better moving forward! Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Alan W. I. <ir...@be...> - 2016-09-22 18:59:16
|
Hi Tom: At the end of this I have a question concerning using our preferred workflow at github (assuming someone wants to take responsibility for such a move). But first, you need some background. PLplot used CVS for a long time, then SVN for a long time, and then fairly recently made the transition to git, but with an enforced rebase workflow since that was so similar to the CVS and SVN workflow we had been using previously. And we still have core developers getting up to speed with git even though we have made it easy for them to transition from svn with the rebase workflow. We also have some developers with quite a bit more experience with git who are urging that we might want to move to a more sophisticated workflow that makes collaboration more convenient then it is with git format-patch/am, but we have proved with some git format-patch/am collaborations that that method works well, and the tradeoff for moving to a merge-based workflow appears to be either (a) a completely messed up git history that is impossible for a human to understand or (b) a complex but enforced merge-style workflow that maintains clean --first-parent history (see, e.g., <https://itk.org/Wiki/Git/Workflow/Topic#History_Shape>). In both the CMake and Itk cases, that clean --first-parent history is enforced by server side hooks, but both those related projects have a human git integration manager (Brad King in the CMake case) to help git users navigate the complex merge workflow rules (and particularly help them get the mess sorted out when they inevitably run afoul of the workflow enforcement rules). Given our own CVS/SVN background, Brad's advice when we first moved to git was to follow the enforced rebase workflow that we currently have, but he did also say after several years of that we might want to move to a git workflow similar to that used by CMake. I would not stand in the way of such a move if someone else wanted to take full responsibility for it including being the guy to interpret for the rest of our developers what has gone wrong when the server side hooks reject their pushes. Note, I am assuming here that whatever workflow we adopt will be enforced by server side hooks (just like now) because otherwise you just end up with a mess. @Tom: I assume github would allow us to set any server side hooks we wanted to use to enforce our adopted workflow (just like SF does), but could you confirm that please? Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |