Skip to content

Commit

Permalink
Only use plotname and plotID as title for gtk format
Browse files Browse the repository at this point in the history
In all other cases it is part of the filename
  • Loading branch information
BlackEdder committed Aug 19, 2016
1 parent 043153d commit bc1bf3a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/plotcli/draw.d
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ unittest
void draw(Appender!(typeof(aesDefaults())[]) aes)
{
import std.range : empty, front;
import ggplotd.ggplotd : title, GGPlotD;
import ggplotd.ggplotd : GGPlotD;
import ggplotd.aes : group;
import ggplotd.axes : xaxisLabel, yaxisLabel;
import ggplotd.colour : colourGradient;
Expand All @@ -103,7 +103,7 @@ void draw(Appender!(typeof(aesDefaults())[]) aes)
version(plotcliGTK)
{
import core.thread : Thread;
import ggplotd.ggplotd : Facets;
import ggplotd.ggplotd : title, Facets;
import ggplotd.gtk : GTKWindow;
static GTKWindow[string] windows;
auto facets = Facets();
Expand All @@ -125,11 +125,12 @@ void draw(Appender!(typeof(aesDefaults())[]) aes)
gg.put(discreteLegend);
}
gg.put( geomType( ps ) );
gg.put( title( ps.front.plotname ) );
version(plotcliGTK)
{
if (ps.front.format == "gtk")
{
gg.put( title(
ps.front.plotname ~ "_" ~ ps.front.plotID) );
facets.put( gg );
} else {
gg.save(ps.front.plotname ~ ps.front.plotID ~ "." ~
Expand Down

0 comments on commit bc1bf3a

Please sign in to comment.