Draw plot without vertical frame lines

I would like to draw a plot with just a partial frame, i.e. a frame that includes the x axis, the top horizontal line but does not include the left and right lines. Is that possible? I have searched the style parameters and looked at the code (following TCanvas::DrawFrame): it does not look like it is possible.

{
   TCanvas *c1 = new TCanvas("c1", "Dynamic Filling Example",210,70,700,504);
   c1->SetFillColor(0);
   c1->SetFillStyle(4000);
   c1->SetBorderSize(2);
   c1->SetFrameFillStyle(0);
   c1->SetFrameLineColor(0);
   c1->SetFrameFillStyle(0);
   c1->SetFrameLineColor(0);
   c1->SetFrameBorderMode(0);

   TH1F *hpx = new TH1F("hpx","This is the px distribution",100,-4,4);
   hpx->SetBinContent(71,196);
   hpx->SetBinContent(72,195);
   hpx->SetBinContent(73,161);
   hpx->SetBinContent(74,140);
   hpx->SetBinContent(75,133);
   hpx->SetEntries(5);

   hpx->GetYaxis()->SetAxisColor(0);
   hpx->GetYaxis()->SetLabelColor(0);
   hpx->Draw("");
}

[quote=“couet”][code]
{
TCanvas *c1 = new TCanvas(“c1”, “Dynamic Filling Example”,210,70,700,504);
c1->SetFillColor(0);
c1->SetFillStyle(4000);
c1->SetBorderSize(2);
c1->SetFrameFillStyle(0);
c1->SetFrameLineColor(0);
c1->SetFrameFillStyle(0);
c1->SetFrameLineColor(0);
c1->SetFrameBorderMode(0);

TH1F *hpx = new TH1F(“hpx”,“This is the px distribution”,100,-4,4);
hpx->SetBinContent(71,196);
hpx->SetBinContent(72,195);
hpx->SetBinContent(73,161);
hpx->SetBinContent(74,140);
hpx->SetBinContent(75,133);
hpx->SetEntries(5);

hpx->GetYaxis()->SetAxisColor(0);
hpx->GetYaxis()->SetLabelColor(0);
hpx->Draw("");
}
[/code][/quote]

Thank for the example code! I found that, with Root 5.22, it works as desired with the only small problem that the y-axis is drawn after the x-axis in white color and it overwrites (thus erasing) the beginning of the x-axis with its lowermost tick. This can be solved with:

hpx->SetTickLength(0, “Y”);

Thanks,

Alberto

yes, there is several ways to remove the Y axis.